I'm having problems with this one;
http://www.dynamicdrive.com/style/cs...rizontal_tabs/
The first div in the CSS doesn't get rendered from the mark up. I've added an extra div at the start of the CSS and it all works. I guess I'm missing a { or } in the code but I can't see where.
Here's the CSS;
Any help appreciatedCode:<style type="text/css"> .animatedtabs{ border-bottom: 1px solid gray; overflow: hidden; width: 100%; font-size: 14px; /*font of menu text*/ } .animatedtabs ul{ list-style-type: none; margin: 0; margin-left: 10px; /*offset of first tab relative to page left edge*/ padding: 0; } .animatedtabs li{ float: left; margin: 0; padding: 0; } .animatedtabs a{ float: left; position: relative; top: 5px; /* 1) Number of pixels to protrude up for selected tab. Should equal (3) MINUS (2) below */ background: url('../media/AnimatedTabLeft.gif') no-repeat left top; margin: 0; margin-right: 3px; /*Spacing between each tab*/ padding: 0 0 0 9px; text-decoration: none; } .animatedtabs a span{ float: left; position: relative; display: block; background: url('../media/AnimatedTabRight.gif') no-repeat right top; padding: 5px 14px 3px 5px; /* 2) Padding within each tab. The 3rd value, or 3px, should equal (1) MINUS (3) */ font-weight: bold; color: black; } /* Commented Backslash Hack hides rule from IE5-Mac \*/ .animatedtabs a span {float:none;} /* End IE5-Mac hack */ .animatedtabs .selected a{ background-position: 0 -125px; top: 0; } .animatedtabs .selected a span{ background-position: 100% -125px; color: black; padding-bottom: 8px; /* 3) Bottom padding of selected tab. Should equal (1) PLUS (2) above */ top: 0; } .animatedtabs a:hover{ background-position: 0% -125px; top: 0; } .animatedtabs a:hover span{ background-position: 100% -125px; padding-bottom: 8px; /* 3) Bottom padding of selected tab. Should equal (1) PLUS (2) above */ top: 0; } </style> #top { position:relative;top:1px; } #banner { margin: 5px auto 0 auto; position:absolute;top:1px;background-image:url('TitleBanner.jpg');background-repeat:no-repeat; background-position: center;height:140px; width:1000px;border:3px;border-color:#0066FF,;border-style:groove } #navbar { margin: 5px auto 0 auto;position:relative;top:140px; } #navbarbtm { position:relative;top:171px;border-bottom:2px;border-bottom-color:#6699FF;border-bottom-style:ridge } Here's the mark up; <!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="CSS/AnimatedTabs.css" rel="stylesheet" type="text/css"> <title>Animated Tabs Demo</title> </head> <body> <div id="banner"> <div id="navbar"> <div class="animatedtabs"> <ul> <li class="selected"><a href="http://www.dynamicdrive.com"title="Home"><span>Home</span></a></li> <li><a href="http://www.dynamicdrive.com/style/"title="Council"><span>Council</span></a></li> <li><a href="http://www.dynamicdrive.com/new.htm" title="Minutes"><span>Minutes</span></a></li> <li><a href="http://www.dynamicdrive.com/revised.htm" title="Village Hall"><span>Village Hall</span></a></li> <li><a href="http://tools.dynamicdrive.com" title="Events"><span>Events</span></a></li> <li><a href="http://tools.dynamicdrive.com" title="Reports"><span>Reports</span></a></li> <li><a href="http://tools.dynamicdrive.com" title="Parish Plan"><span>Parish Plan</span></a></li> <li><a href="http://www.dynamicdrive.com/forums/"title="Newsletter"><span>Newsletter</span></a></li> </ul> </div> </div> <div id="navbarbtm"></div> </body>
John




Reply With Quote
Bookmarks