CSS - Float Attribute Conflicting With Unordered Lists
www.l33tmonkey.com/sun/index.html
completely ignoring the image issues, which are next on the list to sort out, I have a problem. I've gotten hold of two seperate scripts with permission from the author, and they wouldn't wrk together so I linked them externally as two seperate files. Both scripts cater to IE and other common browsers using conditional comments and are reasonably tidy even after I've been playing with them So here's the problem, the horozontal menu, with the two drop down sub menus, needs to float to the right, the float attribute is already present within the menu script, however, the float attribute will only work when set to the left. I altered it to the right and the menu went haywire. the scripts and index source can be viewed freely. Any help on this would be really appreciated, I'm no expert on CSS Similar TutorialsTake a look at my code... http://www.trinitysql.co.uk/jubilee2005/ Those links at the top are a <ul> with fixed height and width... What I want to do is push the text down to the bottom and make the whole area of the <li> link... Any help you couyld give me would be very much appreciated! Thanks! How do I go about making my unordered list use a image file or the bullet? Code: <ul> <li><a href="#onesweetcoma">One Sweet Coma </a></li> <li><a href="#untitled">Untitled</a></li> <li><a href="#freedomfound">Freedom Found </a></li> <li><a href="#yourwords">Your Words</a></li> <li><a href="#reprise">Reprise</a></li> <li><a href="#cantpullaway">Can't Pull Away </a></li> <li><a href="#sleepingawake">Sleeping Awake</a></li> <li><a href="#wherewestand">Where We Stand</a></li> <li><a href="#echooffthewalls">Echo Off the Walls </a></li> </ul> my image name is bullet.png Hello, I need to make some unordered lists within a page appear with a graphic as a bullet, and some appear with a disc. My current code is: Code: ul {list-style-image: url(../img/redarrow.gif)} But this makes all unordered lists appear with the graphic, and of course if I comments out that code, all unordered lists appear with a disc. Please let me know if it is possible to code it so that I can have both in a page. Thanks! I can't seem to find any issues of this on the web, or maybe I'm not doing a correct search. here's my problem. I'm creating a horizontal menu with an unordered list <ul> with each <li> tag using a background image. My problem is, in IE (both ie6 & 7), the menu seems to display having a staggered cascading effect. Firefox works great as usual... see screenshot at http://clubsix1.com/images/cascade_effect.png Here's my CSS code: Code: #masthead ul#mystuffnav { padding:0; margin:0; width:334px; } #masthead ul#mystuffnav li { float:left; margin-bottom:1px; clear: both; } /* Fancy Buttons, My Stuff Nav */ #masthead ul#mystuffnav a.button, #masthead ul#mystuffnav a.button:link, #masthead ul#mystuffnav a.button:visited { padding:3px 7px 5px; text-decoration:none; outline:none; /*display:block; OQO */ font-size:10px; float:left; text-align:center; margin:0 1px 0 0; line-height:1em; } Help is GREATLY appreciated! =) Working on converting the layout in the attached image and I'm having a problem with the main menu. Here are my problems: *trying to push down the menu items. Setting padding-top only seems to extend the borders up above the horizontal line and doesn't push the text down. *getting the highlight color above the text. Some ideas I had were trying to set a background image for each list item (but how can I do this without the borders extending above the horizontal line) or setting a background image of the whole unordered list (but with this will "break" when users have different font sizes). Any thoughts? Layout is attached as well as what little code I have since I'm just starting on this project. Thanks in advance, -b Here is a menu I am trying to build. I used different background colors to see what sections are doing what. Essentially what I am trying to achieve is that the menu items defined by the <li> (green) tag have text vertically centered in them and be the same height as the ul section (yellow). Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>My site</title> <style type="text/css"> body { background: black; } #level0 { background: red; clear: both; } /* end #level0 */ #level1 { background: orange; width: 957px; margin: auto; } /* end #level1 */ #level1 ul { background: yellow; clear: both; text-align: right; border-right: thin solid #cfcfcf; margin: 0; padding: 0; height: 40px; } /* end #level1 ul */ #level1 ul li { background: green; line-height: 40px; font-size: 12px; padding-top: 13px; padding-bottom: 13px; vertical-align: middle; border-left: thin solid #cfcfcf; text-align: right; margin: 0; color: #9f9f9f; padding-left: 1em; padding-right: 1em; display: inline; } /* end #level1 ul li */ #level1 ul li.active { background: blue; } /* end #level1 ul li.active */ #level1 ul li a { background: purple; color: #9f9f9f; } /* end #level1 ul li a */ #level1 ul li a:hover { background: inherit; text-decoration: none; } /* end #level1 ul li a:hover */ #level1 ul li.active a:hover { text-decoration: none; background: none; } /* end #level1 ul li.active a:hover */ </style> </head> <body> <div id="level0"> <div id="level1"> <ul> <li><a href="#">Link 1</a></li><li><a href="#">Link 2</a></li><li><a href="#">Link 3</a></li><li class="active"><a href="#">Link 4</a></li><li><a href="#">Link 5</a></li><li><a href="#">Careers</a></li><li><a href="#">Link 6</a></li> </ul> </div> </div> </body> </html> What happens is that this version renders as I want it in Safari, one pixel too high in Opera and Firefox, and several pixels too short in IE. What are some things I can try to fix this behavior so that it is consistent (-ly correct ) across browsers? Again for those that have helped me on other threads I greatly appreciate it. I have used CSS before but this is my first time using it for layout and am struggling with it a bit. Hi, Trying to create a menu using <ul> tags and to have a nice spacing between <li> items. I have tried the line-height property but it seems like IE ignores them. Firefox formats the line-height properly. Can anyone help me? Should the line-height be applied to ul or li tags? /Hubba Bubba Quick question... I am trying to make an unordered list and have the first level have no indent/margin. But I want the second level to be indented 15 pixels. I'm having problems getting this done. Any suggestions? Thanks I am having a problem with a menu generated by a CMS. Basically it generates a series of nested unordered lists for the navigation. It only shows a parents children menu items if you are within that section. The problem is that it still outputs the unordered list and list item elements for the other child menus, but just leaves them blank. Leaving something like this: Code: <ul><li></li> <li></li> <li></li> <li></li> <li></li> </ul> This works fine in Firefox... but of course when you get to IE, it leaves big vertical spaces in the navigation. Unfortunately, I can't attach any IDs or classes to the child UL or LI elements. There is only one ID on the main UL, <ul id="subnav">. So my question is, can anyone think of a way that I can modify my CSS to take out those blank spaces created by empty <ul>s in IE? You can see the page he http://www.holidaytravelincentives.com/index.php/products/air-accommodations/ I've got an odd bug in IE7 that's got me completely stumped. I'm using drupal for sort of an art/comic site, and I've built my own theme off of the Zen theme, for anyone who's familiar with it. My main page works just fine. Once I get to either the gallery or forum things start to collapse and get weird. My sidebar loses it's positioning, and the width of the list items in the unordered list shrink down to the size of the image or tex they contain, rather than extending to fill their container. The only consistency I can find here is that they're both using unordered lists, but beyond that I'm not sure what's going on. I've tried to go through and swat any obvious CSS and HTML errors, so any advice or insight on this would be much appreciated. eta: looks like I can't post an opening topic with links yet, so I'll have to post them as a reply or something. Hi. I was developing a website . I decided to use float in order to align content on my webpage. Everything worked fine in IE but when I viewed page in NS then linkbar and main area that supposed to be aligned correctly, where collided together. The link to this webpage is: http://www.itcollege.ee/~rbomberg/hagerel/index.php If viewed in NS then you should notice that the links on the left are not aligned properly and main body text is also dislocated. The CSS file used for this website is available at: http://www.itcollege.ee/~rbomberg/hagerel/test.css Thanks for all the help. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <style type="text/css"> <!-- body { font-family: tahoma, verdana, arial } #main { width: 60%; margin: 10px auto; border: solid 1px #333; background-color: #fff } #header { padding: .5em; background-color: #fff } #sidebar { float: left; width: 100px } #content { padding: 20px; border-left: dotted 1px #ccc; margin-left: 140px } #footer { padding: .5em; border-top: solid 1px #ccc } --> </style> </head> <body> <div id="main"> <div id="header"> <h1>Header</h1> </div> <div id="sidebar"> <form action="login.php" action="post"> <p>Username: <input type="text" name="username" /></p> <p>Password: <input type="password" name="password" /></p> <p><input type="submit" value="Login"></p> </form> <ul> <li><a href="">Link</a></li> <li><a href="">Link</a></li> <li><a href="">Link</a></li> </ul> </div> <div id="content"> This is the content </div> <div id="footer"> Footer </div> </div> </body> </html> Why doesn't this automatically adjust the size of the div next to it? Am I better going for the position attribute here guys? Cheers subject isn't too good anyhow.. i have 4 cells __ __ |1 | |2 | --- --- __ __ |3| |4 | --- --- 2 and 4 are said to float right, such that 1 and 3 define the height of the page.. but.. when the contents of 2 go LONGER than the contents of 1, number 4 doesn't float right properly.. instead this happens __ __ |1 | |2 | --- | | --- | | |4| --- --- __ |3| --- do you see that? 4 tries to float right, but since it's called underneath 1, and 2 is extended, floating right relative to the page doesn't make it ACTUALLY float right any thoughts that will render this properly? (namely that cells 1 and 3 will inherit the height of 2 and 4 somehow?) Hi, I've tried adding AdSense to my site, but it always messes up my page. This seems to happen only in Chrome and in Safari, but it works fine with IE & Firefox Here's a sample page I created to show the problem: http://www.deutsched.com/adsense.php Try displaying it with Chrome & Firefox, and you'll notice the difference I've tried tracking down the source of the error, and it seems to be that part of the CSS file, however I'm not that good at programming, so I'm unsure of how to fix it: Code: #header { position: relative; height: 85px; } Any help would be greatly appreciated. Thanks ! Hi There - Am converting another design from tables, working with a CMS (Drupal) and an existing CSS / table combination that I didn't write and have no choice about. Think of the header as having three sections. The top section has logo on the left, search box on the right. Rounded corners. I'm cool with that section. Then there's a space. Created a div for the space. Love the space. Problems with the space in IE. Will go into it later. Then there's the next section. Rounded corners. Contains the entire page. On the left is a pulldown menu, about 1 cm from the top. On the right is a tabbed menu. This menu has flexible height. It needs to be right up against the bottom with the menu below it. Call this section the tabbed menu section. Third section. Immediately below that is a bar menu like the one Apple's got. Looks like a metal bar with divisions. Call this primary links. ---------- First, the space between. In IE, when you roll over the bar menu, the space disappears. Won't come back. Initially, in the second section, floated the pulldown menu left and the tabbed menu right. That worked fine, except that the tabbed menu had a width of 100% and pushed up the pulldown menu so the section was too wide. When I put it to 65%, all hell broke loose with the bar menu in the third section below it and bits of it snuck up into the second section. If I left it alone, and left the tabbed menu at 100%, when I checked over its container with firebug, it said that it was being affected by the primary links. I figured that out also because the background for that container was a really weird color that I finally found in the background of the navigation id and changed to white. Primary was overlapping it so I couldn't see it with firebug. So after fiddling with several clearing methods, I gave up and decided to try a table. Table worked fine, and the second section looks good except that there's a one pixel space between the tabbed menu and the bar menu. --------- It is my greatest wish right now to be able to float the pulldown to the left, the tabbed menu to the right and have the primary links stay below. I wish I could get the space to work and I wish for a clear understanding of it all so I can then figure out where to put the corners. Anyone who can enlighten me on this would have my undying gratitude. I've been working on this all day and the deadline's tomorrow. Code: <div id="top part" logo and searchbox </div> <div> that pesky space that disappears in IE when roll over primary links </div> <div id=navcontainer> dropdown and tabbed menu </div> <div id="navigation" class="menu> <!-- couldn't find the menu class in the css --> <div id="primary" class="clear-block"> contains barmenu - very fussy </div> </div> Here's the relevant CSS: Code: div#navigation { background: #fff url(../images/blue/menu-bg.png) 100% 100% repeat-x; } #primary { line-height: 30px; } #primary ul { padding:0; margin:0; list-style:none; } #primary li { display:inline; } #primary a { font-weight:bold; display:block; float:left; padding:0px 14px 0px 14px; margin: 0px 1px 0px 0px; font-size: 95%; } #primary a { background-position:0% 0px; } #primary a:hover { text-decoration: none; background-position:0% -42px; } #primary a.active { background-position: 0% -84px; } #primary a { background: url(../images/blue/menu-div.png) 100% 0 repeat-y; color:#666666; font-size: 120%; font-family:Arial,Helvetica,sans-serif; } #primary a:hover { color: 666666; background: #B8B8B8; } #primary a.active { color: 666666; background: #B8B8B8; } Hello, I am having an issue with positioning my drop-down menu properly on a test site I am making for a relative...which he told me last night needs to be done tomorrow. I am not really CSS-savvy, my CSS skills consist of copy and paste from open-source pages and editing them through trial and error and lots of page refreshing. I am trying to combine a CSS drop down menu with a CSS gallery template -- lyteforms.com/galtest.html THE PROBLEM: I can't get that drop down menu to be centered on the page -- I've tried html <center> tags, CSS position tags, and div align tags in every manner and place possible, but it doesn't seem to work. Could any kind soul view source the stubborn thing and tell me why I am failing miserably? Hi, Ok I have a slight problem. I am using two different styles for my <ul>/<li> tags. This is how it works: Code: <td class="contentmain"> <p>This is some example text - here is a list: <ul> <li>Link 1</li> <li>Link 2</li> </ul> </p> <div id="menu"> <ul> <li><a href="../link/" class="linkmenu">Link 1</a></li> <li><a href="../link/" class="linkmenu">Link 2</a></li> </ul> </div> </td> Now, I need to use two different styles for the td "contentmain" cell and the div "menu". Now, I know I could just put a class to the list, but I am creating this site for someone who doesn't know too much about HTML so I need to make it simple. These are my two styles: Code: td.contentmain ul { color: #CCCCCC; list-style-type: none; padding: 20px; margin: 0px; } td.contentmain li { background: url(../_img/img_dot.gif); background-repeat: no-repeat; padding-left: 3em; padding-bottom: 3em; font-size: 0.95em; } Code: div#menu ul { margin-left: 0px; padding-left: 0px; font-size: 0.95em; } div#menu li { list-style: none; margin-left: 0px; padding-left: 0px; font-size: 0.95em; text-decoration : none; border-bottom: 1px solid #999999; line-height: 2em; } Unfortunately, the list in the div "menu" seems to take some of the td.contentmain style - any idea how to say, don't use it...if you know what I mean. I know it's because the div is inside td.contentmain but I have no idea how to sort it out. Cheers, Chris http://www.deltatango5.com/TESTER6b.html this is the link to reference ....... once you select a menu item: SERVICES and chose a link it of course populates the paired windows ... BUT when you go to GIFT IDEAS for instance, the menu appears until you mouse over ..... there is some kind of conflict with the "content" window/div and the submenu ..... I for the life of me cannot find the issue--assistance is greatly appreciated. NOTE: it works fine with IE ... FIREFOX is the issue ... thanks in advance and happy new year! Hi, Hope you can help. I'm having trouble trying to figure out why the links in my twitter feed have the same Background color thats applyed to my navbar. (#9933CC. I'm certain I isolated the CSS to affect only the navbar. For some reason its affecting the twitter feed and I can work out why. Can you help?? My site is below. www. smartbod co.uk (Delete spaces in url as I cant post link as im new) Thanks in advance David |