CSS - Css And Nested List
I am not getting the right behaviour from my css in a nested list i made for a menu.
here is the css for the menu Code: #main_menu{ position: absolute; top: 252px; left:30px; margin:0; padding:0; } #menu_item_1{ list-style-type: none; } #menu_item_1 a{ color:#11352B; text-decoration:none; font-weight:300; vertical-align:text-top; } #menu_item_1 a:hover{ color:#007888; text-decoration:underline; font-weight:300; vertical-align:text-top; } #menu_item_2{ list-style-type: none; } #menu_item_2 a{ color:#007888; text-decoration:none; font-weight:300; vertical-align:text-top; } and here is the xhtml section showing the menu Code: <ul id='main_menu'> <li id='menu_item_1'><a href='index.php'>Home</a></li> <li id='menu_item_1'><a href='about_us.php'>About Us</a></li> <li id='menu_item_1'><a href='customers.php'>Customers</a></li> <li id='menu_item_2'><a href='products.php'>Products</a></li> <ul> <li id='menu_item_1'><a href='atlas2000.php'>Atlas 2000</a></li> <li id='menu_item_1'><a href='atlas2000.php'>Web Request</a></li> <li id='menu_item_1'><a href='atlas2000.php'>Atlas Mailer</a></li> </ul> <li id='menu_item_1'><a href='service.php'>Service</a></li> <li id='menu_item_1'><a href='download.php'>Download</a></li> <li id='menu_item_1'><a href='support.php'>Support</a></li> <li id='menu_item_1'><a href='contact_us.php'>Contact Us</a></li> </ul> the main list works great but the sublist the color is wrong, it should behave like the main one does....I think I have not structured my css correctly, but can not figure it out. Similar TutorialsHi I have a vertical menu containing main and subcategories. subcats are hidden, when a main cat is clicked then subcats are displayed, all is done with css no javascript. here is the structure, Code: <ul id="nav"> <li class="level item-1 nav-clothes active parent"> <a href="/clothes.html"><span>Clothes</span></a> <ol class="level item-1"> <li class="level1 nav-clothes-shirts"> <a href="/clothes/shirts.html"><span>Shirts</span></a> </li> <li class="level1 nav-clothes-tanks"> <a href="/clothes/tanks.html"><span>Tanks</span></a> </li> <li class="level1 nav-clothes-raincoats"> <a href="/clothes/raincoats.html"><span>Raincoats</span></a> </li> <li class="level1 nav-clothes-dresses"> <a href="/clothes/dresses.html"><span>Dresses</span></a> </li> <li class="level1 nav-clothes-swimsuits"> <a href="/clothes/swimsuits.html"><span>Swimsuits</span></a> </li> <li class="level1 nav-clothes-outerwear last"> <a href="/outerwear.html"><span>Outerwear</span></a> </li> </ol></li> <li class="level item-2 nav-beds parent"> <a href="/beds.html"><span>Beds</span></a> here is my all related css, external css file, Code: #nav { font-size:13.5px; color:#000; padding:0 0 0 0; margin:-20px 0 0 0; width:100%;} /* All Levels */ #nav li { text-align:left; } #nav li.over { z-index:999; } #nav a, #nav a:hover { display:block; line-height:1.3em; text-decoration:none; } #nav span { display:block; cursor:pointer; white-space:nowrap; } #nav li ul span {white-space:normal; } #nav li li.parent {} /* 0 Level */ #nav li { clear:both; position:relative; display:block; } #nav li.active a { color:#000; text-decoration:underline; } #nav a { float:left; padding:2px 14px 11px 0px; color:#000; font-weight:bold; } #nav li.over a, #nav a:hover { color:#000; text-decoration:underline; } #nav .item-1 ul a { background:url(../images/arr_sub_menu.gif) 0 9px no-repeat; padding:0 0 0 0; color:#1A1616;} #nav .item-2 ul a {padding:0 0 0 0; color:#1A1616;} #nav .item-3 ul a {padding:0 0 0 0; color:#1A1616;} #nav .item-4 ul a {padding:0 0 0 0; color:#1A1616;} #nav .item-5 ul a {padding:0 0 0 0; color:#1A1616;} #nav .item-6 ul a {padding:0 0 0 0; color:#1A1616;} #nav .item-7 ul a {padding:0 0 0 0; color:#1A1616;} #nav .item-8 ul a {padding:0 0 0 0; color:#1A1616;} #nav .item-9 ul a {padding:0 0 0 0; color:#1A1616;} #nav ul li a { padding:0 0 0 0;} #nav ul li a:hover { padding:0 0 0 0; text-decoration:none;} /* 1st Level */ #nav ul li, #nav ul li.active { float:none; margin:0; padding:6px 0 0 29px; background:#FFFFFF; border-left:1px solid #E8E7E7; border-right:1px solid #E8E7E7; } #nav ul li.over {} #nav ul li.last { background:#FFFFFF; padding-bottom:15px; } #nav ul a, #nav ul a:hover { float:none; padding:0;} #nav ul li a { font-weight:normal !important; } /* 2nd level */ #nav ul { position:absolute; width:199px; top:23px; left:-10000px; background:url(../images/bg_sub_menu.gif) 0 0 no-repeat; padding:23px 0 0 0; border-bottom:1px solid #E8E7E7; margin-left:100px; } /* 3rd+ Level */ #nav ul ul { top:5px; background:none; padding-top:0; border-top:1px solid #E8E7E7; } /* Show Menu */ #nav li.over > ul { left:0; } #nav li.over > ul li.over > ul { left:100px; } #nav li.over ul ul { left:-10000px; } #nav ul li a { background:url(../images/arr_sub_menu.gif) 0 9px no-repeat; padding:0 0 0 0; color:#1A1616; } #nav ul li a:hover { color:#1A1616 !important; } #nav ul span, #nav ul li.last li span { padding:3px 15px 4px 15px; } #nav li ul { display:none; } #nav li:hover ul{display: block; } #nav ol { margin-left:5px; margin-bottom:10px; } #nav ol li { padding-left:15px; background-image:url(../images/ol_bg_lines.gif); font-size:12px; font-weight:normal; } #nav ol li.last { background-image:url(../images/ol_bg_lines_last.gif); } inline css code to overwrite the default behavior for target page Code: ul#nav {margin : 0 10px; margin-bottom:0px;} ul#nav li {height : 14px; margin-top : 5px;} ul#nav li a, ul#nav li a:hover {} ul#nav ul {margin-top : -8px; background : url(/images/drop-ul-bgr.gif) no-repeat; } ul#nav ul li {height : auto; margin-top : auto;} ul#nav ol li a { padding:0px; } ul#nav ol li { margin:0px; padding:5px 0 5px 15px; } ul#nav ol { border:#ccc 1px solid; padding-bottom:30px; } I am attaching a screenshot to explain the problem, i have given border to the OL to explain the problem. In the screenshot the pink arrow is pointing the place, BEFORE BEDS, where i want to give more space but the child list keeps overlapping rather than pushing the parent list downwards. any help is much appreciated I am really stuck with this. hmmmm i want a nested list for a navigation menu, vertical on the left side all buttons aligned with 1px margin in between ok it almost works but i cant get rid of the extra list item that contains the nested list how does it not show itself I have read more tutorials on list than I care to recall and still I am having difficulties getting this to work right. Here is the web page The top navigation bar has a link "Other regions". I want to have a drop down list of the other regions under it. I nested a list under the "Other regions" li. It is working - sort of but not correctly. The nested list is showing up under "home" and the are all on top of each other. Here is the html: Code: <div id="topbar"> <ul> <li><a href="index.html">Home</a></li> <li><a href="about_us/about_us.html">About Us</a></li> <li class="dropmenu"><a href="other_regions.html">Other Regions</a> <ul> <li><a href="#">Ireland</a></li> <li><a href="#">Germany</a></li> <li><a href="#">USA (North America)</a></li> <li><a href="#">Latin America</a></li> <li><a href="#">Other</a></li> </ul> </li> </ul> </div> Here is the css: Code: #topbar { height: 20px; background-color: #3399FF; border: 1px solid #000099; padding-left: 10px; margin-bottom: 10px; text-align: left; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-size: 12px; font-weight: bold; } #topbar a:link, #topbar a:visited { color: #FFFFFF; background-color: transparent; border: 1px solid #3399FF; width: 100px; padding: 1px 2px 1px 2px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; text-decoration: none; } #topbar a:hover, #topbar a:active { color: #000099; background-color: #DDEEFF; border: 1px solid #000099; width: 100px; padding: 1px 2px 1px 2px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; text-decoration: none; } #topbar ul { list-style: none; margin: 1px 0px 1px 0px; padding: 2px 0px 0px 0px; } #topbar li { display: inline; margin-right: 150px; } .dropmenu ul { position: relative; } .dropmenu li { position: absolute; } .dropmenu a:link, .dropmenu a:visited { color: #000000; background-color: transparent; border: 1px solid #FF00FF; width: 100px; padding: 1px 2px 1px 2px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; text-decoration: none; } .dropmenu a:hover, .dropmenu a:active { color: #000099; background-color: #DDEEFF; border: 1px solid #000099; width: 100px; padding: 1px 2px 1px 2px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; text-decoration: none; } .dropmenu li:hover ul { display: block; } /*Main Section two columns under top section*/ #wrapper{ width: 100%; min-height: 519px; background: url(../images/bgcol.gif) repeat-y; padding: 0px; margin: 0px; } Help please Weird issue with FF ive noticed can anyone explain why this happens? I have two divs, header and nav. Nav is inside header. Now when I placed a list inside nav it pushed my header div down abit maybe 15px. However when I added the following rule... Code: #nav ul{ margin-top:0px; } The error goes away. Strange isnt it? Heres my html and css Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="css/css.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="vwd_scripts/curvy/vwd_curvycorners.js"></script> <script type="text/javascript"> <!-- gCurvyCorners[0]="nav,5,5,false,false,0,0"; //--> </script> </head> <body> <div id="header"> <div id="nav"> <ul> <li>Home</li> <li>Browse</li> </ul> </div> </div> <div id="content"> <h1 id="mainheader">Latest Templates</h1> <h1 class="sideheader">List One Title</h1> <h1 id="latesttemplates">Heres the latest templates</h1> <ul class="sidebarlist"> <li>list one</li> <li>list two</li> <li>list three</li> <li>list four</li> <li>list five</li> </ul> <h1 class="sideheader" style="top:150px">List One Title</h1> <ul class="sidebarlist" style="top:175px;"> <li>list one</li> <li>list two</li> <li>list three</li> <li>list four</li> <li>list five</li> </ul> <div id="templateholder" class="toprow" style="left:20px;"></div> <div id="templatedescript" class="descriptoprow" style="left:20px;"> <table> <tr> <td class="descrip">Name</td> <td class="answer">template1name</td> </tr> <tr> <td class="descrip">Added</td> <td class="answer">template1date</td> </tr> <tr> <td class="descrip">Type</td> <td class="answer">template1type</td> </tr> <tr> <td class="descrip">Images</td> <td class="answer">template1images</td> </tr> </table> <table> <tr> <td><span class="P">Preview</span><span class="D">Download</span></td> </tr> </table> </div> <div id="templateholder" class="toprow" style="left:185px;"></div> <div id="templatedescript" class="descriptoprow" style="left:185px;"> <table> <tr> <td class="descrip">Name</td> <td class="answer">template2name</td> <tr> <td class="descrip">Added</td> <td class="answer">template2date</td> </tr> <tr> <td class="descrip">Type</td> <td class="answer">template2type</td> </tr> <tr> <td class="descrip">Images</td> <td class="answer">template2images</td> </tr> </table> <table> <tr> <td><span class="P">Preview</span><span class="D">Download</span></td> </tr> </table> </div> <div id="templateholder" class="toprow" style="left:350px;"></div> <div id="templatedescript" class="descriptoprow" style="left:350px;"> <table> <tr> <td class="descrip">Name</td> <td class="answer">template3name</td> <tr> <td class="descrip">Added</td> <td class="answer">template3date</td> </tr> <tr> <td class="descrip">Type</td> <td class="answer">template3type</td> </tr> <tr> <td class="descrip">Images</td> <td class="answer">template3images</td> </tr> </table> <table> <tr> <td><span class="P">Preview</span><span class="D">Download</span></td> </tr> </table> </div> <div id="templateholder" class="toprow" style="left:515px;"></div> <div id="templatedescript" class="descriptoprow" style="left:515px;"> <table> <tr> <td class="descrip">Name</td> <td class="answer">template4name</td> <tr> <td class="descrip">Added</td> <td class="answer">template4date</td> </tr> <tr> <td class="descrip">Type</td> <td class="answer">template4type</td> </tr> <tr> <td class="descrip">Images</td> <td class="answer">template4images</td> </tr> </table> <table> <tr> <td><span class="P">Preview</span><span class="D">Download</span></td> </tr> </table> </div> <div id="templateholder" class="bottomrow" style="left:20px;"></div> <div id="templatedescript" class="descripbtmrow" style="left:20px;"> <table> <tr> <td class="descrip">Name</td> <td class="answer">template5name</td> <tr> <td class="descrip">Added</td> <td class="answer">template5date</td> </tr> <tr> <td class="descrip">Type</td> <td class="answer">template5type</td> </tr> <tr> <td class="descrip">Images</td> <td class="answer">template5images</td> </tr> </table> <table> <tr> <td><span class="P">Preview</span><span class="D">Download</span></td> </tr> </table> </div> <div id="templateholder" class="bottomrow" style="left:185px;"></div> <div id="templatedescript" class="descripbtmrow" style="left:185px;"> <table> <tr> <td class="descrip">Name</td> <td class="answer">template6name</td> <tr> <td class="descrip">Added</td> <td class="answer">template6date</td> </tr> <tr> <td class="descrip">Type</td> <td class="answer">template6type</td> </tr> <tr> <td class="descrip">Images</td> <td class="answer">template6images</td> </tr> </table> <table> <tr> <td><span class="P">Preview</span><span class="D">Download</span></td> </tr> </table> </div> <div id="templateholder" class="bottomrow" style="left:350px;"></div> <div id="templatedescript" class="descripbtmrow" style="left:350px;"> <table> <tr> <td class="descrip">Name</td> <td class="answer">template7name</td> <tr> <td class="descrip">Added</td> <td class="answer">template7date</td> </tr> <tr> <td class="descrip">Type</td> <td class="answer">template7type</td> </tr> <tr> <td class="descrip">Images</td> <td class="answer">template7images</td> </tr> </table> <table> <tr> <td><span class="P">Preview</span><span class="D">Download</span></td> </tr> </table> </div> <div id="templateholder" class="bottomrow" style="left:515px;"></div> <div id="templatedescript" class="descripbtmrow" style="left:515px;"> <table> <tr> <td class="descrip">Name</td> <td class="answer">template8name</td> <tr> <td class="descrip">Added</td> <td class="answer">template8date</td> </tr> <tr> <td class="descrip">Type</td> <td class="answer">template8type</td> </tr> <tr> <td class="descrip">Images</td> <td class="answer">template8images</td> </tr> </table> <table> <tr> <td><span class="P">Preview</span><span class="D">Download</span></td> </tr> </table> </div> </div> </body> </html> Code: @charset "utf-8"; /* CSS Document */ body{ margin:0px; } #nav{ position:relative; height:35px; background-color:#3d3d66; width:405px; left:55%; top:65px; } #nav li{ display:inline; color:#FFFFFF; font-family:Arial, Helvetica, sans-serif; font-size:16px; font-weight:bold; margin-right:10px; } #nav ul{ margin-top:0px; padding-top:8px; } #header{ height:100px; background-color:#333333; background-image: url(../images/jpegs/header.jpg); background-repeat:repeat-x; } #content{ position:relative; margin-top:50px; margin-left:auto; margin-right:auto; height:500px; width:974px } h1#mainheader{ margin-top:0px; padding-bottom:2px; border-bottom:dotted; border-bottom-width:1px; font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: bold; width:70%; } .sideheader{ position:absolute; margin-top:9px; top:0px; left:75%; padding-bottom:2px; border-bottom:dotted; border-bottom-width:1px; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; width:25%; } h1#latesttemplates{ position:absolute; margin-top:0px; padding-top:50px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; border-right:dotted; border-right-width:1px; width:72.7%; height:105%; top:0; } .sidebarlist{ position:absolute; margin-top:9px; top:25px; left:695px; } .sidebarlist li{ list-style-image:none; list-style-type:none; } #templateholder{ position:absolute; height:105px; width:140px; border:solid 1px; } .toprow{ top:100px; } .bottomrow{ top:330px; } .descriptoprow{ top:215px; } .descripbtmrow{ top:445px; } #templatedescript{ position:absolute; width:140px; height:105px; } #templatedescript table{ width:140px; } .descrip{ text-align:left; font-weight:bold; font-size:12px; } .answer{ text-align:right; font-size:12px; } .P{ color:#FF0000; text-decoration:underline; font:Arial, Helvetica, sans-serif; font-size:12px; border-right:1px solid; border-right-color:#FF0000; margin-left:12%; padding-right:5px; } .D{ color:#FF0000; text-decoration:underline; font:Arial, Helvetica, sans-serif; font-size:12px; margin-left:5% } http://img55. imageshack .us/img55/6775/cssexamplesy8.png ^ please remove the space before and image shack to view the image I've taken a screenshot of a problem I need help with, which is how IE and Firefox handle nested lists. Using code like this: Code: <ul> <li>item 1</li> <li>item 2</li> <li> <ul> <li>sub item 1</li> <li>sub item 2</li> </ul> </li> <li>item 3</li> </ul> Firefox displays the new list without being pushed down yet IE seems to create the space for where the list item would be and I can't figure out how to remove the space / how to get it to act like firefox. Removing the list item that holds the nested ul solves all problems but it isn't valid so I'm looking for another solution. Cheers ok i would like to have on my nested list 1.1 and 1.2 instead of 1? ie Code: 1. hhh 1.1 jjj 1.2 kkk 2. kkk 2.1 kkkk etc but currently if i have the list-style-type as decimal the inner list comes out as just 1,2,3 etc... is it even possible to do this? if you go he http://www.tvshow-caps.co.uk/showPics.php?showid=24&season=6&episode=1 you will see that the nested list do not expand but OVERLAP in IE. firefox displays is ok. EDIT1: i have fixed the nested list problem (i was using height property which IE doesnt like) second problem: now IE doesnt apply the border-bottom property properly (use the above link) I have the following list that I want displayed horizontally. I chose to do it with display:inline instead of float:left as that seemed to be the only way to get it to center on the page: http://www.jimandkris.com/listtest.html However, now I can't figure out how to get those submenus to align under their respective parent. Hopefully this is an easy one, any suggestions? Seems like most people use unordered lists for menus. Code: <ul> <li>menu1</li> <li>menu2</li> <li>menu3</li> </ul> Others use definition lists. They claim it is less buggy with IE. Code: <dl> <dt>menu1</dt> <dt>menu2</dt> <dt>menu3</dt> </dl> Any thoughts on whether unordered lists or definition lists are best? Also, I sometimes see the menu text surrounded by a SPAN tag. I believe this has to do with only being able to assign one attribute to an element, but am uncertain. Can anyone help explain? Also, if I want a single HTML to work with various CSS, is it a good idea to always include the SPAN tag? Code: <ul> <li><span>menu1</span></li> <li><span>menu2</span></li> <li><span>menu3</span></li> </ul> Thanks I have a list that I've created with the list-style-type being an image. For some reason, the space between the list-style-image and the list text differs in IE and Firefox. Has this happened to anyone else, or am I doing something incorrectly? Below is the code. The cell that these lists sit in has has an id of 'cellid'. Code: #cellid { margin: 0 0; padding: 0 0; } #cellid ul { margin: 10px 0 0 20px; padding: 0 0; } #cellid li { margin: 0 0; padding: 0 0; list-style-image: url(images/idxyellowlist.gif); } The ul has a margin of 20px on the left to line up with an element above it. Does anyone have any ideas as to how to get around this space? Thanks, Brian Hi, Have an unordered list which I use as a menu. I have set the list-style-type property to none because I don't want any bullets or anything. When I look at the menu within a bordered div, it seems like there is a margin to the left of the <ul>. Eventhough there are no bullets in the <ul>, the <li> are still placed at the same location from the left. How can I left adjust the unordered list so that there are no visible margin at the left side? /Hubba Bubba Hi, I have an OL list (the numbered one) and the horz gap between the list item number (as automatically generated by OL) and the text of the LI is too big (according to client). Looks fine in FF but is bigger alright on IE (ahem naturally .....) I've played with the CSS for both the OL & LI styles even setting all margins and paddings to 0 but without effect on the gap. Is there any way to style that gap? Code below. Kevin <ol class="most_read"> <li class="most_read_li">Apples</li> <li class="most_read_li">Oranges</li> </ol> .most_read { text-align:left; color:#808080; font-size:10px; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight:normal; margin-left:30px; padding:0px; margin-top:5px; } .most_read_li { margin-bottom:7px; margin-right:7px; } Hi I am creating a navigation bar using unsorted list and CSS. I have given my CSS and HTML code here Code: #navcontainer { width: 200px; margin-top:150px; } #navcontainer ul#navlist { width:200px; clear:left; text-align:left; margin-left:0; padding-left:0; list-style:none; font-size: 12px; font-weight:bold; line-height: 14px; } #navcontainer ul#navlist li { margin-left:0; padding: 0px; display: block; list-style:none; border-bottom: 1px solid gray; } #navcontainer ul#navlist li.last { border-right: 0; background:none; } a.linkText { padding: 10px; display: block; color : #444444; font-family : arial; font-size : 11px; font-weight : bold; text-decoration : none; height:25px; } a.linkText:link { color : Aqua; /* you can define other styles if necessary */ } a.linkText:visited { color : Maroon; /* you can define other styles if necessary */ } a.linkText:hover { color : Blue; } </style> </head> <body> <div id="navcontainer"> <ul id="navlist"> <li><a class="linkText" href="#">Item One</a></li> <li><a class="linkText" href="#">Item two</a></li> <li><a class="linkText" href="#">Item three</a></li> <li><a class="linkText" href="#">Item four</a></li> <li><a class="linkText" href="#">Item five</a></li> </ul> </div> The problem is, when I select the next list item, previously selected list item should come to the original color. Is there any way I can achieve this? Your guidence will be appreciated. Many thanks well if i dont put any css firefox does this with nested link: Code: link1 link2 sublink1 IE doesnt indent the sublink. so is there any hack available? PS>i tried using margin-left but by doing that firefox indents it even further so it looks bad? cheers Thanks for taking the time to read my question If I have <div class="main"> something here <div class="sub1"> something here that has more height than the above div</div> </div> Shouldn't the height of main be stretched to fit the height of sub1 where sub1 has a greater height than main. Does it have to be display: block; or float: left; ? Brad Hi everyone. I've come pretty close to solving this problem but certain problems keep showing themselves. Here's the mockup menu I'm trying to recreate. Current CSS: Code: .interior #sidebar ul{ padding:20px 0 5px 0px; list-style:none; } .interior #sidebar ul.outerUL {border-bottom:1px solid white;} .interior #sidebar ul.middleUL{border-top:1px solid white; margin:0; padding:5px 0 0 0;} .interior #sidebar ul.innerUL{padding:5px 0;} .interior #sidebar ul li a {padding:5px 0 5px 0; margin:0;} .interior #sidebar ul li.outerLI a{ border-top:1px solid white; padding:0 0 0 20px; color:#003371; width:100%; } .interior #sidebar ul li.middleLI a{ padding-left:25px; color:#3f699d; } .interior #sidebar ul li.innerLI a{ padding:2px 0 2px 30px; color:#0f8b53; } .interior #sidebar a {text-decoration:none;} Current HTML: Code: <div id="sidebar"> <ul class="outerUL"> <li class="outerLI"><a href="#">Our Misssion</a></li> <ul class="middleUL"> <li class="middleLI"><a href="#">Quality</a></li> <ul class="innerUL"> <li class="innerLI"><a href="#">Dedication</a></li> <li class="innerLI"><a href="#">Perseverance</a></li> </ul> <li class="middleLI"><a href="#">Choice</a></li> <li class="middleLI"><a href="#">Value</a></li> </ul> <li class="outerLI"><a href="#">Parkland Timeline</a></li> <li class="outerLI"><a href="#">Management Bios</a></li> </ul> </div> I've tried multiple different ways of acheiving the desired look, but each one has a certain problem with it. This is the best I can get while still keeping each link the correct color and font size. I'd be all set (I can deal with the padding later) if I could get the white bar above each of the top-level links to extend across the whole sidebar div. I am trying to figure out how to use the clear functionality nested within divs. I am already using floats to position 3 columns for the layout, but would like to use the clear functionality to help with form placement in the second column. The problem is, even though it is nested with a div dedicated to the center column, it still uses the right and left column to judge clears...thus its all pushed below the right and left column. Any ideas? I've found that nesting tables works very well for getting data aligned properly. I'm having serious trouble doing the same thing with css. For example, I can easily create a table with 2 col, 2 rows, then put another table in each box and do get things just the way I want. I can't figure out a way to do that with css. Is it possible? Should I even try? Thanks! First off - I'm not even sure if its technically allowed or correct but I am nesting 3 <div>'s in one container <div> (I assume this is ok - quite positive) So when positioning nested <div>'s I am running into problems. Here is the link http://www.nextwavehosting.net/new (looking at the bottom bar with the website thumbnail, info, and the word test) Here is a snippet of code... The container... Code: div.bottomInfo { position: absolute; top: 510px; left: 15px; width: 723px; height: 190px; z-index: 6; background-color: #EDEBE6; } The nested <div>'s Code: div.featured { position: relative; top: 15; left: 252; width: 150px; height: 114px; z-index: auto; } div.featInfo1 { position: relative; top: 20; left: 252; width: 150px; height: 35px; z-index: auto; } div.featInfo2 { position: relative; top: -32; Left: 670; z-index: auto; } the first nested <div> is positioned exactly how it should... the 2nd <div> is correct horizontally but vertically i would assume that it is still being positioned relative to the container... meaning that the second <div>'s top: 20; should be more like top: 140; to position it just below the first <div> yet the top: 20; works... the 3rd one is way off and is nearly impossible to position correctly... Any helpful tips or advice on this one? |