Needing a Little CSS Help

Started by Jeremy M., January 02, 2017, 06:45:20 PM

Previous topic - Next topic

Jeremy M.

I'm needing to know what to insert to create Sub-Menu's. Here is the HTML and CSS Codes I am playing with.


<div id="nav">
<ul>
<li class="active">
<a href="#">Home</a>
</li>
<li>
<a href="#">Blog</a>
</li>
<li>
<a href="#">About</a>
</li>
<li>
<a href="#">Links</a>
</li>
<li class="last">
<a href="#">Contact</a>
</li>
</ul>
<br class="clear" />
</div>



* {
margin: 0;
padding: 0;
}

a {
color: #719912;
text-decoration: underline;
}

a:hover {
text-decoration: none;
}

body {
background: #0000FF;
color: #CACBCC;
font-size: 12pt;
line-height: 1.75em;
}

body,input {
font-family: "Trebuchet MS", sans-serif;
}

br.clear {
clear: both;
}

form {
margin: 0;
padding: 0;
}

h1,h2,h3,h4 {
font-weight: normal;
text-transform: uppercase;
}

h2 {
font-size: 1.75em;
}

h2,h3,h4 {
color: #FFF;
font-family: Arvo, serif;
margin-bottom: 1em;
}

h3 {
font-size: 1.5em;
}

h4 {
font-size: 1.25em;
}

img {
border-radius: 10px;
}

img.left {
float: left;
margin: 8px 20px 20px 0;
}

img.top {
margin: 8px 0 20px 0;
}

label.login {
display: block;
margin: 0 0 6px 0;
}

p {
margin-bottom: 1.5em;
}

ul {
margin-bottom: 1.5em;
}

ul h4 {
margin-bottom: 0.35em;
}

.form {
margin: 0 0 32px 0;
}

.gallery ul.gallery_sidebar li, #footerContent ul.gallery_footer li {
border: none  !important;
display: block;
float: left;
margin: 0 20px 20px 0;
padding: 0  !important;
}

.gallery ul.gallery_sidebar, #footerContent ul.gallery_footer {
list-style: none;
margin: 0;
padding: 0;
}

#banner {
background: #FFF;
height: 250px;
margin: 24px 0 0 0;
padding: 32px;
position: relative;
width: 916px;
border-radius: 10px;
}

#box1 {
margin: 0 0 24px 0;
overflow: hidden;
width: 916px;
}

#box2 {
float: left;
overflow: hidden;
width: 444px;
}

#box3 {
margin: 0 0 0 468px;
overflow: hidden;
width: 444px;
}

#content {
background: #FFF;
color: #3B3B3B;
padding: 32px;
width: 916px;
border-radius: 10px;
}

#content a {
color: #719912;
}

#content h2, #content h3, #content h4 {
color: #719912;
}

#copyright {
margin: 0 0 36px 0;
padding: 56px 0 88px 0;
text-align: center;
}

#copyright a {
color: #CACBCC;
}

#header {
height: 138px;
padding: 32px;
position: relative;
width: 916px;
}

#logo {
height: 154px;
left: 32px;
line-height: 154px;
position: absolute;
top: 0;
}

#logo a {
color: #FFF;
text-decoration: none;
}

#logo h1 {
font-family: Arvo, serif;
font-size: 3em;
}

#main {
margin: 24px 0 24px 0;
padding: 0;
position: relative;
width: 980px;
}

#main .sectionList {
list-style: none;
padding-left: 0;
}

#main .sectionList li {
clear: both;
padding: 20px 0 20px 0;
}

#main ul {
list-style: none;
}

#main ul li {
border-top: solid 1px #D1D1D1;
padding: 12px 0 12px 0;
}

#main ul li.first {
border-top: 0;
padding-top: 0;
}

#nav {
bottom: 0;
font-family: Arvo, serif;
height: 48px;
left: 0;
line-height: 48px;
margin: 0 0 0 0;
padding: 0 32px 0 32px;
position: absolute;
width: 916px;
}

#nav a {
color: #DFE0E0;
text-decoration: none;
text-transform: uppercase;
}

#nav ul {
list-style: none;
}

#nav ul li {
display: inline;
padding: 0 16px 0 16px;
}

#nav ul li.first {
padding-left: 0;
}

#outer {
margin: 64px auto 0 auto;
position: relative;
width: 980px;
}

#search {
height: 154px;
line-height: 154px;
position: absolute;
right: 32px;
top: 0;
}

.inputBox {
padding: 8px;
border: solid 1px #515556;
border-radius: 8px;
}

.inputButton {
background: #719912;
border: 0;
color: #FFF;
font-family: Arvo, serif;
margin-left: .5em;
padding: 6px;
border-radius: 8px;
}

.comments a, .readmore a {
background: #719912;
border: 0;
color: #FFF;
font-family: Arvo, serif;
margin-left: .5em;
padding: 6px;
border-radius: 8px;
text-decoration: none;
color: #FFF!important;
}

Deaks

are you wanting these as sub menus in your forum navigation or on another area of your forum?

If it is the later then you need to look at index.template.php
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Kindred

Actually, sub menu items for a forum main menu would involve
index.template.php, index.css and subs.php at the very least
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Deaks

Kindred, I am trying to ascertain the location where they want it before giving the detailed info, as I stated in my initial reply if they just want to place it in a specific section of the forum it would be index.template.php, for example assuming the default theme and where the logo is, they would not need to modify subs to place that code in.  Subs is only needed if they wish to add it to the forum navigation.  I may not have done alot of coding recently but themes I remember well.
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Advertisement: