CSS - Pure Css Layout With Flash Header
I am wondering which is the best way to display a flash header with a pure css layout. This is the way that I have it now and it works fine but I am new to web design and figured that if I am going to do it I should do it the right way.
The css: Code: #master { width: 770px; margin: 10px auto; position: relative; padding: 0; border: 1px solid #566; border-top: 1px solid #566; background-color: #FFFFFF; overflow: hidden; } #masthead{ padding: 0px 0px 0px 0px; border-bottom: 1px solid #566; width: 100%; } The html: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <!-- DW6 --> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Pure CSS Test Page</title> <link rel="stylesheet" href="3col_leftNav.css" type="text/css"> </head> <body> <div id="master"> <div id="masthead"> <td> <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="770" height="200"> <param name="movie" value="../../images/header.swf"> <param name="quality" value="High"> <embed src="../images/header.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="160" height="160"></object> </td> <div id="breadCrumb"> <a href="#">breadcrumb</a> / </div> </div> Is there a better way to display the flash document? Also, should I create another layout div, say #flashheader? One last question. Is this the proper way to center the page? Similar Tutorialshi I am shifting to web 2.0 therefore learning a lot of things that I used to do with tables. Now I have a task to make a form and also display text in parallel style e.g Name User Name ------- Rating stars Email User Email ------- Balance amount to accomplish this in tables we might make two cells to hold Name, EMail in one and Rating and Balance in the second then in each CELL further rows and cells for each entity e.g Name User Name how can we display this kinda info using pure CSS? I found a website online http://www.compare-voip.net/viatalk.php there towards the bottom you can see how the email and rating stats are displayed in two columns, this is done with tables though I want to do the same with CSS only thanks in advance Hello css gurus. I'm trying to fit a flash movie with 100% height in a liquid layout but i cant get rid of scroll bars. i have tied to explain the problem in this image: http://i(dot)imgur(dot)com/PhvSZ.gif (sorry new members are not allowed to post with links) in that image you can see its fine in case (1) but in case (2) when i add a header div on top, flash movie doesnt fill available space. Can anyone tell me how can i fix it with a heading div on top? Thanks. Hey everyone. I've been working on a redesign of a website I run. Up until now, I hardly used CSS for anything at all. My new redesign is using XHTML-Strict and CSS. I'm having some big problems working out the layout of the header. The new website layout is located at: hxxp://Schiz0.securityexploits.com/~Schiz0/skittles_beta/home.php (If you get some php errors, just refresh the page. It's a work in progress). Basically, this is what I WANT it to look like: hxxp://img140.imageshack.us/img140/8765/headerit2.png I want the entire header is aligned on FOUR rows: Left News, Banner, Right News Username, Date, Donations bar AP/Rank, Search Boxes, Donate link Navigation Links The problem I'm having is...the objects aren't aligned properly in rows, and it's kinda throwing off the whole layout of the header. You can see in the following screenshot what I mean. The Donations bar isn't aligned with the date and username row. hxxp://img139.imageshack.us/img139/5341/sitescreenshotuj3.png I tried using both div's and span's. I also played around with the css for quite a while, and still can't get it. The CSS for that website is located at: hxxp://schiz0.securityexploits.com/~Schiz0/skittles_beta/stylesheets/Schiz0.css If anyone can help me out, I would greatly appreciate it. I'm so close to just using html tables instead of these div's and span's Note: Sorry for the "hxxp" links...Apparently new user accounts, such as mine, aren't allowed to post links. Hey gang, Ok, this is embarrassing, but I'm currently working at redesigning my website (here), and would love to get rid of the craptacular tables-based layout. I've spent the last few days googling for a good two-column header and footer tutorial but I can't see any that works well and explains what is going on ( I'd rather know what's working than cut'n'paste someone's css scheme ). I'm not too worried about <IE5.5/etc compatibility as most of the data on the page is UTF-8 ( and IE5.0 - 5.5 makes up 1.49% of my visitors ). This is what I have so far - I just need to get rid of those two cells! Can anyone point me in the right direction (or laugh hard at my crappy google-skills ). Hi all, I am trying to basically have a centre column of data on my page. Within this centre column, I am trying to place a header and footer. The CSS is working quite well with the exception that the header and footer seem to be shorter than the width of the main column. In other words, there seems to be a margin on the right and left side between the end of the footer/header and main column. I am not sure what is going on as I have made the widths the same. I am sure I am over-seeing something small. I was following the example found http://www.pmob.co.uk/temp/1colcentred.htm Code: html{height:100%;} body { padding:0; margin:0; height:100%; background-color: #98AFC7; color: #000000; } #outer{ min-height:100%; width:800px; background:pink; color: #000000; margin:auto; text-align:left; position:relative; } * html #outer{height:100%} #header { border-top:1px solid #000; border-bottom:1px solid #000; background:blue; left:-1px; width:800px; height:40px; overflow:hidden; color: #000000; z-index:100; //margin-left:6px; //margin-right:6px; } #footer { position:absolute; bottom:0; left:0; background:green; height:40px; border-top:1px solid #000; width:800px; //margin-left:1%; //margin-right:1%; } #clearfooter{clear:both;height:40px;}/*needed to make room for footer*/ <body> <div id="outer"> <div id="header">Header</div> <p>middle</p> <p>middle</p> <div id="clearfooter"></div> <div id="footer">Footer</div> </div> </body> </html> I was looking for ways to make the layout work with header, body and footer that work in IE, Gecko, Safari, etc.. I thought I found a good solution via Google surfing and it looked great. Then I discovered that it doesn't have the "<!DOCTYPE ...>" tag, so I added it and now it is thrown out of wack in most browsers. Does anyone know of a valid css layout that would include the header, the body and the footer that work. Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <style type="text/css"> /* colored borders put on for visual effect only */ body{ height: 100%; margin: 0; padding: 0; } #spacer{ height: 95%; float: left; width: 1px; font-size: 1px; /* to make sure width is not overridden */ padding: 0; margin: 0; background-color: red; /* visual effect only */ } #contentwrap{ width: 100%; text-align: center; padding: 0; margin: 0; } #content{ padding: 30px; border-width: 1px; border-style: solid; border-color: blue; } #footer{ clear: both; height: 5%; border-width: 1px 0 0 0; border-style: solid; border-color: red; vertical-align: middle; padding: 0; margin: 0; } </style> </head> <body> <div id="spacer"></div> <div id="contentwrap"> <div id="content"> <p>this is the content div</p> <p> </p> <p>more content</p> <p> </p> <p>and even more</p> <p> </p> <p> </p> </div><!-- content --> </div><!-- contentwrap --> <div id="footer">footer</div> </body> </html> I thought I can do this but it doesn't really work as the footer doesn't go all the way down to the bottom when needed... Code: <div id="header"> .... </div> <div id="main"> .... </div> <div id="footer"> .... </div> Thanks, FletchSOD Hello, im trying to make Fixed width 3 columns (each column have fixed width) layout 100% height with header and footer. -Well I see alot of examples around the web, but i dont see complete one and im really tired of searching, i made the Fixed width 3 comlumns layout, left and right are absolute position, and center is relative to the header -the problem is that all columns dont fill the whole height of the browser windows, the footer doesnot work good. so the whole thing is missed up, so please show 100% working example of what i need. Thanks in Advanced Samer I'm attempting to get a page that has a header, footer, left navigation bar with a fixed width, with a right "fluid" content section. I can get it to work by giving the main content a "margin-left" of the width of the navigation panel, and absolutely positioning the navigation. Problem is, with the navigation being absolutely positioned, it takes it out of the flow and doesn't push the container to fit its contents. I've trying playing with using floated divs, which is I'm sure the way I'll have to go, but I want the navigation bar to always be a fixed width of 175px, and I want the content section to stretch to fill the remaining space. I'd also like to make sure the content portion appears BEFORE the navigation panel in the order it appears on the HTML for SEO purposes. I'm sure it's easy using Javascript, but I'd like to do a pure CSS solution, if possible. How do I do that? Here is the link if you want to have a look: http://www.chcs-ut.com/support.php?section=technical Hello, I'm working now on div layout that contains 3 sections (header, body, footer) in one centered wrapper with border (divs with background imgs). My problem is: - divs that are in fact borders (id="l_outerborder_b" and id="r_outerborder_b") don't stretch when main container (id="body_content_text") grows. Here is a html code: Code: <!--BEGIN TEMPLATE HEADER --> <!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> <link href="template.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="template.js" /> </head> <body onload="onloadprocedures()"> <div id="main_container"> <div id="template_header"> <div id="tl_outerborder"></div> <div id="t_outerborder"></div> <div id="tr_outerborder"></div> <div id="l_outerborder_h"></div> <div id="header_content"> <div id="logo"><img src="img/logo.png" alt="" /></div> <div id="slogan"><img src="img/slogan.png" alt="Centrum zdrowia" /></div> </div> <div id="r_outerborder_h"></div> </div> <!-- END TEMPLATE HEADER --> <!-- BEGIN TEMPLATE BODY --> <div id="template_body"> <div id="l_outerborder_b"></div> <div id="body_content"> <div id="body_content_text"> <p>TEST</p> </div> </div> <div id="r_outerborder_b"></div> </div> <!-- END TEMPLATE BODY --> <!-- BEGIN TEMPLATE FOOTER --> <div id="template_footer"> <div style="clear:both"></div> <div id="l_outerborder_f"></div> <div id="footer_content"></div> <div id="l_outerborder_f"></div> <div id="bl_outerborder"></div> <div id="b_outerborder"></div> <div id="br_outerborder"></div> </div> </div> </body> </html> <!-- END TEMPLATE FOOTER --> and CSS: Code: @charset "utf-8"; /* CSS Document */ body { background-color:#FFFFFF; font-family:Tahoma, Verdana, "Times New Roman", Arial; font-size:12px; } a:link {text-decoration: none} /* unvisited link */ a:visited {text-decoration: none} /* visited link */ a:hover {text-decoration: none} /* mouse over link */ a:active {text-decoration: none} /* selected link */ #main_container { position:relative; margin:auto; width:960px; height:auto; } #template_header { float:left; position:relative; width:960px; height:300px; } #header_content { float:left; position:relative; width:900px; height:270px; } #logo { width:310px; height:130px; position:relative; float:left; top:0px; left:0px; } #slogan { width:580px; height:100px; position:relative; float:left; top:0px; left:0px; } #tl_outerborder { float:left; position:relative; background-image:url(img/tl_outerborder.png); width:30px; height:30px; } #t_outerborder { float:left; position:relative; background-image:url(img/t_outerborder.png); width:900px; height:30px; } #tr_outerborder { float:left; position:relative; background-image:url(img/tr_outerborder.png); width:30px; height:30px; } #l_outerborder_h { float:left; position:relative; background-image:url(img/l_outerborder.png); background-repeat:repeat-y; width:30px; height:270px; } #r_outerborder_h { float:right; position:relative; background-image:url(img/r_outerborder.png); background-repeat:repeat-y; width:30px; height:270px; } #body_content { float:left; position:relative; width:900px; overflow:hidden; } #body_content_text { float:left; position:relative; width:600px; margin: auto; overflow:hidden; } #l_outerborder_b { float:left; position:relative; background-image:url(img/l_outerborder.png); background-repeat:repeat-y; width:30px; height:inherit; } #r_outerborder_b { float:right; position:relative; background-image:url(img/r_outerborder.png); background-repeat:repeat-y; width:30px; height:inherit; } #l_outerborder_f { float:left; position:relative; background-image:url(img/l_outerborder.png); background-repeat:repeat-y; width:30px; height:inherit; } #r_outerborder_f { float:right; position:relative; background-image:url(img/r_outerborder.png); background-repeat:repeat-y; width:30px; height:inherit; } #template_body { float:left; position:relative; width:960px; overflow:hidden; } #bl_outerborder { float:left; position:relative; background-image:url(img/bl_outerborder.png); width:30px; height:30px; } #b_outerborder { float:left; position:relative; background-image:url(img/b_outerborder.png); width:900px; height:30px; } #br_outerborder { float:left; position:relative; background-image:url(img/br_outerborder.png); width:30px; height:30px; } Thanks in advance for info how to stretch those doomed divs EDIT: Here is layout concept. URL hTTp://qsrc.pl/layout.jpg Please look at this page http://www.tmhdesign3.com and this one http://www.tmhdesign3.com/real-estate-broker.asp The first one used a flash file, the second does not. On the first page I want the dropdown navigation to overlay on the flash but it does not. I played with z-index to no success... I am trying to create an image gallery/slideshow effect using hover .....however, it isn't working to well. What I want to accomplish is have a user 'hover' over a thumbnail, and have the background-image for that particular tag come into view(it's currently background-positioned off screen.) Has anybody had success with this? Let me know. This isn't working: Code: <html> <head> <title>New Page 1</title> <style type='text/css'> #test { background-image: url('test.jpg'); background-repeat: no-repeat; background-position: -4000px; font-weight: bold; color: red; border-style: solid; width: 400px; height: 400px } #test:hover { background-position: 200px 200px; } </style> </head> <body> <div id='test'>This is a test.</div> </body> </html> Hi, At work I have to do popup menus (I hate them), so I am trying with all I have to not use Javascript. I have the following working using just CSS and HTML: 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" xml:lang="en-US" lang="en-US"> <head> <title>Pure CSS Popups</title> <style type="text/css"> body { font-family: Arial; } div#menubar { background-color: steelblue; font-weight: bold; } div#menubar a.menuhead { position: relative; text-decoration: none; margin-right: 18pt; color: darkblue; } div#menubar a.menuhead:hover { color: white; background-color: darkblue; } div#menubar a.menuhead div.menu { visibility: hidden; position: absolute; left: 0; top: 1em; width: 15em; background-color: steelblue; border: 2px solid darkblue; } div#menubar a.menuhead:hover div.menu { visibility: visible; } div#menubar a.menuhead div.menu div.menuitem { width: 100%; cursor: pointer; background-color: steelblue; border-bottom: 1px solid darkblue; } div#menubar a.menuhead div.menu div.menuitem:hover { background-color: darkblue; } div.menuitem a { } </style> </head> <body> <div id="menubar"> <a class="menuhead" href="">Menu 1 <div class="menu"> <div class="menuitem">Menuitem 1</div> <div class="menuitem">Menuitem 2</div> <div class="menuitem">Menuitem 3</div> <div class="menuitem">Menuitem 4</div> <div class="menuitem">Menuitem 5</div> </div> </a> </div> </body> </html> Now what I want to do is put real hyperlinks inside of the menuitem divs. However, when I do so it messes up for some strange reason in both Firefox and IE. If someone could tell me why I would GREATLY appreciate it. Code: <div id="menubar"> <a class="menuhead" href="">Menu 1 <div class="menu"> <div class="menuitem">Menuitem 1</div> <div class="menuitem">Menuitem 2</div> <div class="menuitem"><a href="">Menuitem 3</a></div> <div class="menuitem">Menuitem 4</div> <div class="menuitem">Menuitem 5</div> </div> </a> </div> In Firefox, the menu items after the one with the hyperlink no longer format correctly, and the menu also becomes part of the menubar. In IE it looks ok, but when the mouse is moved over the menuitem hyperlink the menu goes away. In both, the menuitem divs get shrunk down to the width of the text. Any ideas??? I have a pure css menu that I like but it does not work with IE. works exactly as I want in firefox. in IE when I hover over the menu bar the list do not become visible any one know what I need to do to make it work? Thanks BadIdea The page code is Code: <html> <head> <meta name="author" content="Jeffrey Bourque"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="cache-control" content="no-cache"> <link rel="stylesheet" type="text/css" href="menuCss.css" /> <title>Operations Control</title> </head> <body> <div class="mainheader"> <table> <tr><td><img src="img/sitelogo.png" width="135" height="59"/></td><td><h1>Operations Control</h1></td></tr> <tr><td colspan="2"><?php echo "Welcome! $useid "; ?> -- <a href="../logout.php" class="nh"> Log Out</a></td></tr> </table> </div> <div id="navMenu"> <ul> <li><a href="#">Home</a> <ul> <li><a href="#">My Evaluations</a></li> <li><a href="#">My Approvals</a></li> <li><a href="#">My Actions</a></li> <li><a href="#">Phone List</a></li> <li><a href="#">Training</a></li> <li><a href="#">Change Password</a></li> </ul> <!-- end inner ul --> </li> <!-- end main li --> </ul> <!-- end main ul --> <ul> <li><a href="#">Manufacturing</a> <ul> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> </ul> <!-- end inner ul --> </li> <!-- end main li --> </ul> <!-- end main ul --> <ul> <li><a href="#">Quality</a> <ul> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> </ul> <!-- end inner ul --> </li> <!-- end main li --> </ul> <!-- end main ul --> <ul> <li><a href="#">Engineering</a> <ul> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> </ul> <!-- end inner ul --> </li> <!-- end main li --> </ul> <!-- end main ul --> <ul> <li><a href="#">Planning</a> <ul> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">My Actions</a></li> <li><a href="#">Phone List</a></li> <li><a href="#">Change Password</a></li> </ul> <!-- end inner ul --> </li> <!-- end main li --> </ul> <!-- end main ul --> <ul> <li><a href="#">Accounting</a> <ul> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> </ul> <!-- end inner ul --> </li> <!-- end main li --> </ul> <!-- end main ul --> <ul> <li><a href="#">Materials</a> <ul> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> </ul> <!-- end inner ul --> </li> <!-- end main li --> </ul> <!-- end main ul --> <ul> <li><a href="#">Engineering</a> <ul> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> <li><a href="#">Search Data</a></li> </ul> <!-- end inner ul --> </li> <!-- end main li --> </ul> <!-- end main ul --> <br class="clearFloat" /> </div> <!-- end navMenu --> </body> </html> The Css is Code: body { margin:0; padding:0; background:#D0E2DD; } .mainheader { background:#F2F2F2; margin:0; padding-left:30px; padding-top:20px; padding-bottom:5px; padding-right:10px; } .mainheader h1 { color:#000000; font-size:36px; } .navBar { background:#7777BB; color:#2554C7; line-height:30px; } .endBar { clear:both; background:#FFFFFF; padding:0px 10px; border-bottom:1px solid #808080; } .floatR { float:right; } #navMenu { margin:0; padding:0; } #navMenu ul { margin:0; padding:0; line-height:30px; } #navMenu li { margin:0; padding:0; list-style:none; float:left; position:relative; background:#7777BB; } #navMenu ul li a { text-align:center; font-family:"Comic Sans MS", cursive; text-decoration:none; height:30px; width:150px; display:block; color:#ffffff; border:1px solid #ffffff; text-shadow:1px 1px 1px #000000; } #navMenu ul ul { position:absolute; visibility:hidden; top:32px; } #navMenu ul li:hover ul { visibility:visible; } #navMenu li:hover { background:#aaaaaa; } #navMenu ul li:hover ul li a:hover { background:#F2F2F2; color:#000; } #navMenu a:hover { color:#0088ff; } .clearFloat { clear:both; margin:0; padding:0; } Hi folks Looking for a pure css dropdown menu to replace my dhtml one, I do very much like the Adx menu, as compared with suckerfish, for reasons which include: covers select and flash items on the page can colorise the hover background color right across the menu, giving a sense of link hierarchy on a narrow page, the final menu will double back on itself, and also reposition itself vertically if needed I've managed to solve one issue that their code did not seem to, if anyone is interested - removing the space between li items which IE creates - feel free to use the code he http://ied.gospelcom.net/adxmenustest2.html (I've just chosen some garish colors for the moment, so I can see what is going on.) One thing I want to do is add drop shadows. Right hand is OK - just a background image. To achieve a bottom drop shadow, I've added a small li item with a background image. Problem is, adding this extra li item at the end of each menu extends the length of the UL container, considerably more than is needed. In FF, it looks OK, (though there are a few unnecessary pixels above the shadow li item, but in IE, it extends way down below where the drop shadow li item is! Any ideas for removing this extra depth, ie pushing the ul border up, or another way of putting in a drop shadow. I have tried other things as well as an end li item, but the effect is the same! I suppose I could cover it up instead, but a css solution to do it properly would be better! Thanks for your wisdom! Tony Hi guys, I recently learned about pure css drop down menus. Now if you look at my site in FF, and IE, you see in IE, it just doesn't display correctly. Why is this? Tips on fixing this? www.projectfinalfantasy.com Regards, Joseph Man. Hi guys, Say I have a verticle menu, down the left hand side of my site. I want it so when you hover over each link, there are additional links that fly out to the right - of course you got that by the thread name. However, I'm having a bit of trouble, I don't know where to start really as many of the tutorials found are flawed in one way or another (that i've found). Some manage to push the rest of the nav links under it down, so basically Im asking how do I manage to create a nav where the fly out menu manages to 'stick' at the top of all content (to the right and the links under), pure CSS. Any additional tips on how to do this would be brilliant. Thanks in advance, Joe. I searched on google so that to build a pure CSS drop down menu. I have successfully followed some of the tutorials. However I always get stuck in some place or another. I have tried another attempt to do this but I am not getting the wanted results. Basically I want to make the drop down menu work on IE6, IE7 and FireFox. The first problem I face on IE7 is that the menu is not always displayed where I want it (under the link element) and on FireFox it is displayed ON it and not under it. The following is the code. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>scjchoir</title> <style> /***** ribben *****/ div#ribben{ width: 506px; margin: 0 auto; padding:0px; } div#ribben div#nav2{ background: #111; height: 40px; } div#ribben div#nav2 ul{ margin: 0; padding: 0; list-style: none; } div#ribben div#nav2 ul li{ float: left; margin: 0px; padding-top: 6px; } div#ribben div#nav2 ul li a:link, div#ribben div#nav2 ul li a:visited { float: left; margin: 0 1px 0 0; font-size: 8pt; font-weight: normal; text-decoration: none; padding: 6px 15px; color: #ccc; font-weight: bold; } div#ribben div#nav2 ul li a:hover, div#ribben div#nav2 ul li a:active { color: #fff; } div#ribben div#banner img{ display:block; } /***** submenu *****/ div#nav2 ul li ul { display:none; position:absolute; background:#111; color:#fff; clear:both; } div#nav2 ul li:hover > ul { display: block; } div#nav2 ul li ul li{ clear:both; padding:10px; width:150px; } </style> </head> <body> <div id="page"> <div id="ribben"> <div id="nav2"> <ul> <li><a href="index.html">Home</a></li> <li> <a href="events.html">Events</a> <ul> <li>Forthcoming Events</li> <li>Previous Events</li> <li>Archives</li> </ul> </li> <li><a href="members.html">Members</a></li> <li><a href="blog.html">Blog</a></li> <li><a href="media.html">Media</a></li> <li><a href="about.html">About Us</a></li> <li><a href="store.html">Store</a></li> </ul> </div> </div> </div> </body> </html> I am at a lost on how I can do this. If anyone knows of any good tutorials please let me know. I do not want to waist anyones time, however the tutorials I found were not that good. Thanks for any Replies, Regards, Sim085 So I have been working on a menu for my site and it's almost perfect except for one little problem. The dropdown menu displays correctly except for a page that you can only reach from that dropdown menu, you can visit the page here tylerkingdom.com/miltons_ethos/good.html. When hovering over "Case Studies" it repeats that background onto the Sub Nav but if you go back to the homepage and hover over "Case Studies" it displays correctly. I've hacked away at this for hours and still can't figure it out. If anyone has an idea please let me know. I have pasted the CSS below. Thanks Code: /* NAVIGATION */ #navigation { float: right; width: 420px; margin-top: 15px; } #navigation ul { display: inline; list-style-type: none; float: left; margin: 0px; padding: 0px; } #navigation ul li { float: left; margin-left: 20px; height: 25px; width: 120px; } #nav li { float: left; position: relative; list-style: none; height: 45px; width: 120px; margin-top: 0; margin-right: 0px; margin-bottom: 0; margin-left: 20px; padding-top: 0; padding-right: 0; padding-bottom: 18; padding-left: 0; } /* main level link */ #nav a { text-decoration:none; display: block; margin: 0; padding-bottom: 22px; } /* sub levels link hover */ #nav a:link, #nav a:visited { background: none; border: none; color: #666; font-size: 14px; } #nav a:hover, #nav a:active { color: #E2383F; font-size: 14px; } /* dropdown */ #nav li:hover > ul { display: block; } /* level 2 list */ #nav ul { display: none; width: 130px; position: absolute; top: 39px; left: 0; background-color: #eee; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-right-color: #b4b4b4; border-bottom-color: #b4b4b4; border-left-color: #b4b4b4; margin-left: 10px; } #nav ul li { float: none; margin: 0; padding: 0; } #nav ul a { font-weight: normal; padding-left: 35px; } /* clearfix */ #nav:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; } #nav { display: inline-block; } html[xmlns] #nav { display: block; } #nav #nav_case { background-image: url(../images/case.gif); background-repeat: no-repeat; } #nav .current_case a, #nav #nav_case:hover { background-image: url(../images/case_hover.gif); background-repeat: no-repeat; } #nav #nav_quiz { background-image: url(../images/quiz.gif); background-repeat: no-repeat; } #nav .current_quiz a, #nav #nav_quiz:hover { background-image: url(../images/quiz_hover.gif); background-repeat: no-repeat; outline: none; } #nav #nav_about { background-image: url(../images/about.gif); background-repeat: no-repeat; } #nav .current_about a, #nav #nav_about:hover { background-image: url(../images/about_hover.gif); background-repeat: no-repeat; } I've created my first attempt at a pure CSS drop-down menu using an AlistApart article as a guide. It works great in Firefox, but in IE the menu's are reloading the background image and the list bullet images each time you move to a new link in the drop down. The page is here Any ideas? Here is the CSS for the Menu (not cleaned up so pardon it's rag-tagness): Code: ul { padding: 0; margin: 0; list-style: none; } /* First Level */ li { float: left; position: relative; width: 10em; } li#first { border-left-width: 2px; } li#last { border-right-width: 2px; } /* Second Level -- Drop Downs */ li ul { display: none; position: absolute; top: 100%; left: 0; background: url(../images/backgroundvert.gif) bottom left no-repeat; padding: 3px 0 3px 8px; border-right: solid 1px #777777; } /* Reset for all non-IE Browswers*/ li > ul { top: auto; left: auto; } /* Show Second Level when First Level is Rolled Over */ li:hover ul, li.over ul{ display: block; } a { text-decoration: none; } a:link { color: #080; } a:visited { color: #790; } a:active { color: red; } a:hover { text-decoration: underline; } #nav a { font-weight: bold; color: #149AF1; font-size:13px; } #nav a { text-decoration: none; } /* Drop Down Menu Links */ #nav li li a { display: block; font-weight: normal; color: #149AF1; padding: 0.2em 10px 0 15px; background-image:url(../images/bullet.gif); background-repeat:no-repeat; } #nav li li a:hover { padding: 0.2em 10px 0 15px; background-image:url(../images/bullet2.gif); background-repeat:no-repeat; text-decoration: underline; } #navs { border:1px 0 0 0; border-right: 0; width: 100%; padding-left:4px; height:20px; padding-top:3px; } .nonlink { font-weight: bold; color: #149AF1; font-size:13px; cursor:default; } |