CSS - Highlight Current Menu Item Displayed In An Iframe
I'm a CSS newbie, so forgive me if I'm going about this the wrong way entirely. I'm trying to build a website with a menu that changes the source of an iFrame. So I have:
Code: <html> <body> <div>**MENU**</div> <div><iframe id="contentFrame" src="home.htm"></iframe></div> </body> </html> Clicking a menu item, say "Contact Us", changes the src of the iFrame using: Code: <a href="javascript:document.getElementById('contentFrame').src='ContactUs.htm'">Contact Us</a> The menu is pure CSS, with each item underlining as it's rolled over, and some submenus that show up when hovering. What I'm looking to do is have the selected menu item have a different text color. So when you click "Contact Us", that item will change color and stay that other color while navigating the ContactUs.htm page in the iFrame. Is that even remotely do-able? I saw some examples where you use body classes and id's to match the id of the menu item to the body class of the related page. However, I think that would require loading completely separate pages (with the same menu, header, and footer code). I want to avoid the entire page flickering when changing content. I don't seem to be able to access the body class value of the page being loaded in the iFrame. Is that possible to do? Thanks for any guidance you all could offer. Similar TutorialsI have searched to ... and back and can not find out how to target "leftcolumn" menu item to open in "rightcolumn". Using "ID" tag is not a option since it is already used in menu item string. I have tried every combination but the right one. I hope I have included enough of the script to resolve the problem. <style type="text/css"> } .leftcolumn { position: absolute; top: 26px; left: 0px; width: 200px; height: 600px; text-align: justify; } </style> <div id="dmlinks" style="font:bold 14px Trebuchet MS;color:#000000;text-decoration:none"> <a id="dmI0" href="spartaumc.html" target="rightcolumn">Home</a> <a id="dmI1" href="spartaumc_history.html" target="rightcolumn">History</a> <a id="dmI2" href="location.html" target="">Location</a> </div> </head> <body> <div ="rightcolumn"> </div> </body> This is what i am using as my page, and i only want to highlight the top part i.e only test and not the lowers. when i include the current page highlight class to the menu the whole section is highlighted, is there a way to highlight just the li and not the ul under the li that are contained within the same class. Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <title>Test</title> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <style type="text/css" media="screen"> /* horizontal menu coding */ #nav { float: left; margin: 0 0 1em 0; padding: 0; list-style: none; } #nav li { float: left; } #nav li a { display:block; padding: 7px 23.9px; text-decoration: none; font-family:"Arial"; color: white; border-right: 1px solid #ccc; border-bottom: 1px dashed #ccc; font-size: 14px; background-color: #3f6fb7; } } #nav li a:hover { color: #3f6fb7; background-color: #d1cf9f; } #nav pageHorizontal a { background:#d1cf9f; color: white; } #nav ul.current-pagelowerHorizontal a { background:#d1cf9f; color: white; } #nav #nav-home a { background:#d1cf9f; color: white; /* declarations to style the current state */ } /* Print menu coding */ </style> </head> <body onLoad="preloadImages();" bgcolor="#ffffff"> <div class="ts-1-13"> <ul id="nav"> <li id="nav-home" > <a href="testnewMenu.html">test</a> <!--for the new menu --> <ul id="nav"> <a href="XXX.html">Lower 1 </a> </ul> <ul id="nav"> <a href="XXX.html">Lower 2</a> </ul> <ul id="nav"> <a href="XXX.html">Lower 3 </a> </ul> <ul id="nav"> <a href="XXX.html"> Lower 4</a> </ul> <!--for the new menu ul under a list --> </li> <li> <a href="XXX.html">Test2</a> </li> <li> <a href="XXX.cfm">test 3</a> </li> <li> <a href="About_Us.html">About Us</a> </li> </ul> </div> </body> </html> I've been at this for hours and hours and I've tried about 50 different ways to get this to work but I'm totally stumped. I've switched the id and class around (in my site's theme.php and template.html) so often that I'm dizzy. I've searched Google and these forums (among others) for help but still, I'm getting nowhere. Maybe my CSS skills are lacking but this seems simple enough (or is it?). Anyway, here's the problem: The CSS (below) just won't work...so what's wrong with it? What am I missing? Code: ul#navigation { list-style: none; margin:0 auto; padding:0; font-family: Arial, Verdana, Serif; font-weight:bold; background:#32478A; text-transform:uppercase; height:25px; line-height:25px; font-size:12px; } ul#navigation li { float:left; margin:0; padding:0; list-style:none; white-space:nowrap; background:none; } ul#navigation li a { display:block; padding:0 15px; text-transform:uppercase; letter-spacing:1px; border:none; color:#fff; } ul#navigation li a:hover, ul#navigation li a:active, ul#navigation li.current_page_item a { color:#242169; background:#fff; } My template.html UL ID looks like this... Code: <ul id="navigation"> {SYS_MENU} </ul> ...and the theme.php CLASS (login link for example) looks like this: Code: <!-- BEGIN login --> <li><a href="{LOGIN_TGT}" title="Click here to log in" class="current_page_item"> Log in</a></li> <!-- END login --> Here's a link to my site: The hover and active bits seem to work but not the CURRENT...which is what I need to fix. Simply put, the current tab at the top of the page doesn't change to reflect what page you're on. I apologize in advance for the coding mess on my site but I'm just now getting around to cleaning things up. I could really use a hand fixing this little monster. Anyone with stellar CSS skills ready to school this lazy bum? Cheers. EDIT: The link (BBCode) above (to my site) doesn't work, so click my homepage in the drop-down menu under my user name. Thanks. Hi There, Is it possible to highlight the current page without specifying a unique body id? I have been asked to implement current page style on a dynamic site where it is not possible to do this. Any ideas would be greatly appreciated. Thanks, Hi folks. Long time lurker, first time poster. I've got some navigational menus that look great and work well in Firefox and Opera, but there are some odd issues in Internet Explorer. (I'm currently testing with IE7, but am fairly certain the same problems occur on IE6.) Interesting. The system won't let me put the URL in my post as I'm a new user, but this works... The URL for my test page is at a machine named www in the domain bobramstad.com and has the filename menu.html Just run that all together and you'll find the page OK. I'd cut and paste it here but I use a lot of whitespace and the file is kind of long, easier to hit the URL and view source it. For some unknown reason, under IE7, when I highlight any of the entries on the left which have submenus, the formatting of the main entry jumps around. It's odd. I have my own theories as to why this is happening, but frankly, none of them have panned out, or at least, I'm not sophisticated enough to hit on the right solution. FWIW, the current version of our home page uses an older mix of javascript and CSS which is not compatible with Safari or Opera and is also a bit clunky. Strangely, however, it looks fine in Firefox and IE, which might provide some clues as to what I'm doing wrong. I've been looking at this literally for three weeks, on and off, and have made some strides... the last problem is main menu jumping around when hover occurs... Any and all help gratefully received! -- Bob Hello, I can't seem to figure out how to make my CSS drop down menu work the way I want it to. I am using an id in the body tag and a class in the navigatin links so the style sheet will mark what section of the site you are in by making the background change color. This works. The problem is, now that I have the sections being marked, the highlight no longer works. How can I get the highlight to work in the section you are in? I have been experimenting for hours but I can't make it work. http://www.tpxdesign.com/test/Valliant/alpha/index7.php My nav menu code and nav style sheet: Code: <!--[if !IE]><!-- start nav --><![endif]--> <div id="side_nav_bar" class="floater"> <div id="nav_menu"> <ul id="nav"> <li><a href="demoreel.php" class="port">Portfolio</a> <ul> <li><a href="demoreel.php" class="port">Demo Reel/s</a></li> <li><a href="shorts.php" class="port">Shorts</a></li> <li><a href="musicvid.php" class="port">Music Video</a></li> <li><a href="comvid.php" class="port">Commercial</a></li> <li><a href="miscvid.php" class="port">Misc. Video/Film</a></li> <li><a href="gallery.php" class="port">Photo. Gallery</a></li> </ul> </li> <li><a href="services.php" class="serv">Services</a> </li> <li><a href="newupdate.php" class="newe">News & Events</a> <ul> <li><a href="newupdate.php" class="newe">News/Updates</a></li> <li><a href="eventblog.php" class="newe">Event Calendar</a></li> </ul> </li> <li><a href="bio.php" class="about">About Valliant</a> <ul> <li><a href="resume.php" class="about">Resume</a></li> <li><a href="bio.php" class="about">Biography</a></li> <li><a href="contact.php" class="about">Contact</a></li> </ul> </li> <li><a href="links.php" class="link">Links</a></li> <li><a href="index7.php" class="home">Home</a></li> </ul> </div> </div> <!--[if !IE]><!-- end nav --><![endif]--> Code: ul { margin: 0; padding: 0; list-style: none; width: 199px; /* Width of Menu Items */ border-bottom: 1px solid #ccc; } ul li { position: relative; } li ul { position: absolute; left: 198px; /* Set 1px less than menu width */ top: 0; display: none; } /* Styles for Menu Items */ ul li a { display: block; text-decoration: none; color: #777; background: #fff; /* IE6 Bug */ padding: 5px; border: 1px solid #ccc; border-bottom: 0; } /* Fix IE. Hide from IE Mac \*/ * html ul li { float: left; height: 1%; } * html ul li a { height: 1%; } /* End */ ul li a:hover { color: #E2144A; background: #f9f9f9; } /* Hover Styles */ li ul li a { padding: 2px 5px; } /* Sub Menu Styles */ li:hover ul, li.over ul { display: block; } /* The magic */ #home .home, #about .about, #link .link, #newe .newe, #serv .serv, #port .port { color: #000; background-color: #eee; } This problem is only partial to IE and not any other browser (eg. Firefox). What happens is when you click on a menu button to access the submenu, it will not display the submenu directly under the menu button pressed. Also, some submenus have submenus of their own. I have a little triangle that indicates this. The triangles are seen properly in IE, but are seen as question marks (?) in Firefox. I am not sure why though. If anyone could help me figure these problems out I would greatly appreciate it. Thanks. Here is the link: http://www.fired-up.ca Thanks once again. Hello, I have what I hope is an easy question. I am trying to make a horizontal navigation menu based on code I have found on the net. I got 99% of it working EXCEPT: When sub menu text is displayed it "pushes" the main menu text to the right. my example is located he www(dot)katieandconrad(dot)com I have validated both my HTML and CSS, the errors that are displayed have nothing to do with this issue. However, I will be fixing the HTML error tonight. There's nothing I can do with the CSS errors. Thank you very much for your help. Regards, CB I have a navigation menu that uses ul and li for its headings. I also have a javascript that gets called on hover of the menu items. I would like a different script called for hovering over each menu item (so a different action happens for each item). What is the best way to achieve this? Can I have different styles for the menu items? Code: <html> <head> <title>Hi</title> <script type="text/javascript" src="jquery.js"></script> <script src="hoverIntent.js" type="text/javascript.</script> <script type="text/javascript"> $(document).ready(function () { $("#nav a").append("<em></em>"); $("#nav a").hoverIntent(function () { $(this).find("em").animate({ opacity: "show", top: "-34" }, "fast"); var hoverText = $(this).attr("title"); $(this).find("em").text(hoverText); }, function () { $(this).find("em").animate({ opacity: "hide", top: "-43" }, "fast"); }); }); </script> <style type="text/css"> body { margin: 0px; } #nav { border-top: 2px solid #000; border-bottom:2px solid #000; width: 100%; height: 36px; line-height: 36px; float: left; background:url("images/OFF2.gif") repeat-x top left; } #nav ul { list-style: none; width: 900px; margin: 0 auto; padding: 0; position:relative; } #nav li { float: left; } #nav li em { background: url(images/home.png) no-repeat; width: 180px; height: 45px; position: absolute; top: -43px; left: 160px; padding: 20px 12px 10px; z-index: 1; display: none; } #nav li a { font-family:"Georgia", "Sans-Serif"; display: inline-block; text-decoration: none; font-size:medium; padding: 0px 5px; text-align:center; color: #000; width:110px; height: 36px; line-height: 36px; background:transparent url("images/off.gif") no-repeat top right; } #nav li a:hover { font-family:"Georgia", "Sans-Serif"; display: inline-block; text-decoration: none; font-weight:bold; font-size:medium; padding: 0px 5px; width:110px; height: 36px; line-height: 36px; } </style> </head> <body> <div id="nav"> <ul> <li><a href="#">Option1</a></li> <li><a href="#">Option2</a></li> <li><a href="#">Option3</a></li> <li><a href="#">Option4</a></li> <li><a href="#">Option5</a></li> <li><a href="#">Option6</a></li> </ul> </div> </body> </html> I have a CSS menu. How to I remove the RIGHT border for that last link item? I tried a bunch of stuff, I can change the colour of it but I can't seem to get rid of it. Quote: /* ------------------------------------ PVII Menu CSS Express Drop-Down Menu by Project Seven Development www.projectseven.com ------------------------------------ */ /*body { font-family: "Trebuchet MS", Arial, sans-serif; font-size: 100%; background-color: #FFFFFF; margin: 24px 0; padding: 0; background-image: url(images/p7exp_pbg.jpg); background-repeat: repeat-x; }*/ /* Container for the menu. We set top and bottom borders only because the menu container stretches the entire window width. Note that this container can go inside a fixed width element that is centered on the page, if you so desire. It can even go inside a table cell. It carries a background image for aesthetics. */ #menuwrapper { border-top: 1px solid #000; border-bottom: 1px solid #333; background-color: #FFFFFF; background-image: url(../images/menu_bg.gif); background-repeat: repeat-x; } /*Clears the floated menu items. Assigned to a BR tag placed just before menuwrapper's closing DIV tag*/ .clearit { clear: both; height: 0; line-height: 0.0; font-size: 0; } /* p7menubar is the root UL and p7menubar ul applies to all the sub-menu ULs. We set padding and margin to zero to eliminate all indentation, turn bullets off, and set a font-family different from the global font-family declared for the body element above. This sets font for just the menu. Do not add a font-size here. */ #p7menubar, #p7menubar ul { padding: 0; margin: 0; list-style: none; font-family: Arial, Helvetica, sans-serif; } /* Root-Level Links. Do not change the first two properties. Adjust padding values to make the root links taller and to offset them from the left and right edges of the link box. The border right creates a separator between links. Font-size is set here and will apply to all menu levels. Font color is set to light gray. */ #p7menubar a { display: block; text-decoration: none; border-right: 1px solid #333; font-size: 1em; color: #FFFFFF; padding-top: 5px; padding-right: 14px; padding-bottom: 5px; padding-left: 14px; } /* Class assigned to those Root-Level links that have associated Sub-Menus. The top and bottom padding assigned this element must be the same as that assigned to the p7menubar a element. The right padding is increased to accomodate the display of background image depicting a downward pointing arrow. */ #p7menubar a.trigger { padding: 5px 16px 5px 10px; background-image: url(../images/p7PM_dark_south.gif); background-repeat: no-repeat; background-position: right center; } /* The Root-Level list items. Floating left allows them to appear horizontally. Width is for IE5 Mac. The last rule in this style sheet will set the width for this element to auto for all other browsers - hiding it from IE5 Mac. The width is proportional. As you add and edit root menu items, you will need to test this width to ensure it is wide enough to accomodate all text. */ #p7menubar li { float: left; width: 9em; } /* Sets width for Sub-Menu box and the List Items inside - in proportional em units. This allows the sub-menu width to expand if users resize the text in their browsers. */ #p7menubar li ul, #p7menubar ul li { width: 12em; } /* The sub-menu links. We set color and turn off the right border, which would otherwise be inherited from the root link rule. We set top and bottom padding less than the root items and increas the left padding to indent the sub-menu links a small amount in from the root links. */ #p7menubar ul li a { color: #666666; border-right: 0; padding-top: 3px; padding-right: 12px; padding-bottom: 3px; padding-left: 16px; } /* Sub-Menu Unordered Lists describes each dropdown sub-menu grouping. Positioned Absolutely to allow them to appear below their root trigger. Set to display none to hide them until trigger is moused over. Background Color must be set or problems will be encountered in MSIE. Right and bottom borders are set to simulate a raised look. A gradient background image is assigned. */ #p7menubar li ul { position: absolute; display: none; background-color: #FFFFFF; border-right: 1px solid #333333; border-bottom: 1px solid #333333; background-image: url(../images/menu_bg_pulldown.gif); background-repeat: repeat-x; } /* Changes the Text color and background color when the Root-Level menu items are moused over. The second selector sets color and background when Root-Level items are accessed with the keyboard tab key. The third selector sets an active state to support keyboard access in MSIE. The fourth selector is assigned to IE5 and IE6 Windows via the P7_ExpMenu script. Note that IE7 supports hover on elements other than links and so behaves like Firefox, Opera, and Safari - making the menu operable even if JavaScript is not enabled. */ #p7menubar li:hover a, #p7menubar a:focus, #p7menubar a:active, #p7menubar li.p7hvr a { color: #000000; background-color: #999999; } /* Set the Sub-Menu UL to be visible when its associated Root-Level link is moused over. The second selector is assigned to IE5 and IE6 via the P7_ExpMenu script. */ #p7menubar li:hover ul, #p7menubar li.p7hvr ul { display: block; } /* Sets the Text color of the Sub-Level links when the Root-Level menu items are moused over. The second selector is assigned to IE5 and IE6 via the P7_ExpMenu script. The color set should march the normal Sub-Level link color in the rule: #p7menubar ul li a. The background color must be transparent to allow the underlying gradient background on the UL to show through. */ #p7menubar li:hover ul a, #p7menubar li.p7hvr ul a { color: #000000; background-color: transparent; } /* The normal hover class for Sub-Level links. The Important directive is required for older browsers. We set a background color, which shows over the gradient background. We set text color to white. */ #p7menubar ul a:hover { background-color: #606060!important; color: #FFFFFF!important; } /* The single backslash \ character inside this comment causes IE5 Mac to ignore the following rule, which allows other browsers to render top-level menu items to their natural width. Do not edit this rule in any way. */ #p7menubar li {width: auto;} Hi, I have asp menu in my aspx page. There are 3 menu items. If the user clicks on a menu item, I want to highlight the menu with a different color and by default the other menu items should have another color. So only the currently selected menu, should have the different color, and the other menu items should have the default color. How to achieve this? Thank you Hi, I need to adjust only the 1st link(for 1st menu item) of my main menu. I have used pat pat template and have managed to apply a background image for the first item. Here is the css: Code: #first-suckerfish-vertical{ background:url(../images/menutop.jpg) no-repeat; height:75px; margin-top:-2.5px !important; margin-top:-3px; position:relative; } Now to apply style on the main menu item, i use a.mainlevel. but i cant use the a.mainlevel..coz it will adjust all the links. I need to apply style only to the first link of my menu. I am wondering if there's a way in css to access a class from another class or id. I already have this style(#first-suckerfish-vertical) for the 1st menu item. is it possible now to access the a.mainlevel from it.. Thx Hey Guys, was hoping someone could look at my code and tell me what is wrong. My website (http://www.ecbsa.co.za/) refuses to show what page i am on in the menu by highlighting it etc. Here is the CSS: Code: /* - - - BASIC styles [ MANDATORY ] - - - */ .menu, .menu ul { margin: 0; padding: 0; border: 0; font-family: arial, Calibri, "Trebuchet MS", sans-serif; font-size: 11px; line-height:1.3em; list-style-type: none; display: block; height:44px; } .menu li { margin: 0; padding: 0; border: 0; display: block; float: left; /* move all main list items into one row, by floating them */ position: relative; /* position each LI, thus creating potential IE.win overlap problem */ z-index: 5; /* thus we need to apply explicit z-index here... */ } .menu li:hover { z-index: 10000; /* ...and here. this makes sure active item is always above anything else in the menu */ white-space: normal;/* required to resolve IE7 :hover bug (z-index above is ignored if this is not present) see http://www.tanfa.co.uk/css/articles/pure-css-popups-bug.asp for other stuff that work */ } .menu li li { float: none;/* items of the nested menus are kept on separate lines */ } .menu ul { visibility: hidden; /* initially hide all submenus. */ position: absolute; z-index: 10; left: 0; /* while hidden, always keep them at the top left corner, */ top: 0; /* to avoid scrollbars as much as possible */ } .menu li:hover>ul { visibility: visible; /* display submenu them on hover */ top: 100%; /* 1st level go below their parent item */ } .menu li li:hover>ul { /* 2nd+ levels go on the right side of the parent item */ top: 0; left: 100%; } /* -- float.clear -- force containment of floated LIs inside of UL */ .menu:after, .menu ul:after { content: "."; height: 0; display: block; visibility: hidden; overflow: hidden; clear: both; } .menu, .menu ul { /* IE7 float clear: */ min-height: 0; } /* -- float.clear.END -- */ /* -- sticky.submenu -- */ .menu ul { background-image: url(empty.html); /* required for sticky to work in IE6 and IE7 - due to their (different) hover bugs */ padding: 10px 20px 20px 20px; margin: -10px 0 0 -20px; /* background: #fcfcfc;*/ /* uncomment this if you want to see the "safe" area. you can also use to adjust the safe area to your requirement */ } .menu ul ul { padding: 20px 20px 20px 10px; margin: -30px 0 0 0px; } /* -- sticky.submenu.END -- */ /* - - - DESIGN styles - - - */ /* main upper bar */ #main-nav { background: url(img/_ui/main_nav.jpg) left top no-repeat; width:967px; height:44px; text-align: center; } .menu { width:967px; } /* main upper bar */ .menu, .menu ul li { color: #ff6600; } .menu ul { width: 45em; } .menu a:active{ text-shadow: #006699 1px 1px 2px; color: #ff6600; padding: .5em 3.5em; display: block; position: relative; } .menu a { text-shadow: #006699 1px 1px 2px; color: #fff; padding: .5em 3.5em; display: block; position: relative; } .top-level { width:59px; margin-top: 5px; /*padding-top:2.0em;*/ line-height: 1.1em; font-size:11px; } .menu ul li a ul li { text-align: left; } .menu a:hover, .menu li:hover { text-shadow: #006699 1px 1px 2px; display: block; color: #FAA93B; } .menu a:active { text-shadow: #006699 1px 1px 2px; color: #ff6600; padding: .5em 3.5em; display: block; position: relative; } /* submenu hover colours */ .menu li li a:hover { display: block; color: #F89624; background-color:#D9D4CE; } .menu ul>li + li { /* and remove the top border on all but first item in the list */ border-top: 0; } .menu li li:hover>ul { /* inset 2nd+ submenus, to show off overlapping */ top: 5px; left: 90%; } #lhs { background-image: url(img/_ui/lhs_bg_20080401.jpg); background-position: right top; background-repeat: repeat-y; } .lhs_div { height:1px; text-align:right; background-image: url(img/_ui/lhs_dotted_div_333.png); background-position: right middle; background-repeat: no-repeat; } And here is the HTML: Code: <!-- menu updated 20091218 --> <div id="main-nav"> <ul class="adxm menu"> <li><a class="top-level" a href="<%=getCurrentAttribute('site','homepageurl')%>"><b>Home<br>Page</b></a> </li> <li style="height: 40px; margin-top:2px; padding:0; width: 1px; background-color:#506169; "></li> <li style="height: 40px; margin-top:2px; padding:0; width: 1px; background-color:#82A2B1; "></li> <li><a class="top-level" href="http://www.ecbsa.co.za/FAQ"><b>FAQ<br>(Questions)</b></a></li> <li style="height: 40px; margin-top:2px; padding:0; width: 1px; background-color:#506169; "></li> <li style="height: 40px; margin-top:2px; padding:0; width: 1px; background-color:#82A2B1; "></li> <li><a class="top-level" href="http://www.ecbsa.co.za/Information"><b>Info<br>(Information)</b></a></li> <li style="height: 40px; margin-top:2px; padding:0; width: 1px; background-color:#506169; "></li> <li style="height: 40px; margin-top:2px; padding:0; width: 1px; background-color:#82A2B1; "></li> <li><a class="top-level" href="http://www.ecbsa.co.za/New-Contractors"><b>New<br>Contractors</b></a> <li style="height: 40px; margin-top:2px; padding:0; width: 1px; background-color:#506169; "></li> <li style="height: 40px; margin-top:2px; padding:0; width: 1px; background-color:#82A2B1; "></li> <li><a class="top-level" href="http://www.ecbsa.co.za/Contact-Us"><b>Contact<br>Us</b></a></li> <li style="height: 40px; margin-top:2px; padding:0; width: 1px; background-color:#506169; "></li> <li style="height: 40px; margin-top:2px; padding:0; width: 1px; background-color:#82A2B1; "></li> <li><a class="top-level"><b><br></b></a></li> <li style="height: 40px; margin-top:2px; padding:0; width: 1px; background-color:#506169; "></li> <li style="height: 40px; margin-top:2px; padding:0; width: 1px; background-color:#82A2B1; "></li> <li><a class="top-level" href="https://checkout.netsuite.com/app/center/nlvisitor.nl/c.1123442/n.1/sc.6/.f"><b>My<br>Account</a></b></li> </ul> </div> <!-- menu updated 20091218 --> <br><br> </td></tr> <!-- LOGOS AND TABS --> </table> </div> Hi everyone, I was wondering what I would have to do to get an image to be above an in-line horizontal menu when it is is hovered upon. Here is my css so far, right now on hover I have it changing color with text-shadow. I would like to keep that along with the image above. I have seen some tutorials using about using spans but nothing worked. Thanks in advance! Code: .nav ul{list-style-type:none; margin:0 auto; padding:0; width:600px; height:50px; padding-left:500px; padding-top:100px} .nav li {display:inline; padding-right:15px } .nav a {text-decoration:none; color:white;} .nav a:hover {color: #0C0; text-shadow:2px 2px 2px white;} I'm trying to use Eric Meyer's css tabbed navbar to navigate a form. It works, except that I can't seem to get the navbar to indicate the current tab by changing the tab background and bottom border to white. I've been reading and trying different css commands, but haven't been successful. I'm including my html and css below and would appreciate any help. Thanks, Keith Silva CSS: textarea{ font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 1.0em; } button{ font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 1.0em; } /*table{ font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 0.8em; }*/ caption{ font-size: 1.5em; } .add{ font-size: 0.6em; text-align: right; } .frm_tbl{ border-spacing: 5px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 0.8em; color: Navy; } #navlist { padding: 3px 0; margin-left: 0; border-bottom: 1px solid #778; font: bold 12px Verdana, sans-serif; } #navlist li { list-style: none; margin: 0; display: inline; } #navlist li a { padding: 3px 0.5em; margin-left: 3px; border: 1px solid #778; border-bottom: none; background: #DDE; text-decoration: none; } #navlist li a:link { color: #448; } #navlist li a:visited { color: #667; } #navlist li a:hover { color: #000; background: #AAE; border-color: #227; } /*#navlist li:target*/ #mail_frm #mail_nav a, #loc_frm #loc_nav a, #other_frm #other_nav a{ background: white; border-bottom: 1px solid white; } #mail_frm{display: none} #mail_frm:target{display: block} #loc_frm{display: none} #loc_frm:target{display: block} #other_frm{display: none} #other_frm:target{display: block} HTML: // #include settings #cgivar id #cgitextvar notes #cgitextvar directions #if @id != "" //edit existing record #sql load select * from tbl_org where org_id = @id #else //new record #sqlblankrow tbl_org #endif <form method="POST" target="_self" name="org_form"> #formtarget org_save <div id="navcontainer"> <ul id="navlist"> <li id="mail_nav"><a href="#mail_frm">Mail</a></li> <li id="loc_nav"><a href="#loc_frm">Location</a></li> <li id="other_nav"><a href="#other_frm">Other</a></li> </ul> </div> <table id="mail_frm" class="frm_tbl" border="0"> <tr> <td colspan="2">Office<br><input name="office" type="text" size="45" maxlength="45" value="@office" title=""></td> <td>Type<br><select name="type" size="1" class=""> #optionlist selected=@type #options muni Municipality state State discharger Discharger consultant Consultant law_firm Law Firm dischgr_assoc Discharger Assoc elected Elected Official lab Laboratory public Public academia Academia tribe Tribe other Other </select></td> </tr> <tr> <td colspan="2">Division<br><input name="division" type="text" size="45" maxlength="45" value="@division" title=""></td> <td>Region<br><select name="region" size="1" class=""> #optionlist selected=@region #options none None north AZ-North central AZ-Central south AZ-South rb1 CA-North Coast(1) rb2 CA-San Francisco Bay(2) rb3 CA-Central Coast(3) rb4 CA-Los Angeles(4) rb5r CA-Central Valley North(5r) rb5s CA-Central Valley(5s) rb5f CA-Central Valley South(5f) rb6 CA-Lahontan(6) rb7 CA-Palm Desert(7) rb8 CA-Santa Ana(8) rb9 CA-San Diego(9) </select></td> </tr> <tr> <td colspan="2">Department<br><input name="dept" type="text" size="45" maxlength="45" value="@dept" title=""></td> <td>Mail Code<br><input name="mail_code" type="text" size="15" maxlength="15" value="@mail_code" title=""></td> </tr> <tr><td colspan="2">Organization<br><input name="org" type="text" size="45" maxlength="45" value="@org" title=""></td></tr> <tr><td colspan="2">Mailing Address<br><input name="mail_addr" type="text" size="45" maxlength="45" value="@mail_addr" title=""></td></tr> <tr> <td>Mailing City<br><input name="mail_city" type="text" size="20" maxlength="20" value="@mail_city" title=""></td> <td>State<br><input name="state" type="text" size="20" maxlength="20" value="@state" title=""></td> <td>Mailing Zip Code<br><input name="mail_zip" type="text" size="10" maxlength="10" value="@mail_zip" title=""></td> </tr> </table> <table id="loc_frm" class="frm_tbl" border="0"> <tr><td colspan="2">Location<br><input name="location" type="text" size="45" maxlength="45" value="@location" title=""></td></tr> <tr><td colspan="2">Location Address<br><input name="loc_addr" type="text" size="45" maxlength="45" value="@loc_addr" title=""></td></tr> <tr> <td>Location City<br><input name="loc_city" type="text" size="20" maxlength="20" value="@loc_city" title=""></td> <td>Location Zip<br><input name="loc_zip" type="text" size="10" maxlength="10" value="@loc_zip" title=""></td> </tr> <tr><td colspan="2">Directions<br><textarea name="directions" rows="7" cols="60"> #showtext ./directions/org_@org_id #+ </textarea></td> </tr> </table> <table id="other_frm" class="frm_tbl" border="0"> <tr><td colspan="2">Main Office<br><input name="main" type="text" size="45" maxlength="45" value="@main" title=""></td></tr> <tr><td colspan="2">Main Address<br><input name="main_addr" type="text" size="45" maxlength="45" value="@main_addr" title=""></td></tr> <tr> <td>Main City<br><input name="main_city" type="text" size="20" maxlength="20" value="@main_city" title=""></td> <td>Main Zip<br><input name="main_zip" type="text" size="10" maxlength="10" value="@main_zip" title=""></td> </tr> <tr><td colspan="2">Web Site<br><input name="web_site" type="text" size="45" maxlength="45" value="@web_site" title=""></td></tr> <tr><td colspan="2">Notes<br><textarea name="notes" rows="7" cols="50"> #showtext ./notes/org_@org_id #+ </textarea></td> <td><input name="selected" type="checkbox" value="y" title="">Select<br><br> <input name="archive" type="checkbox" value="y" title="">Archive</td> </tr> </table><br> org_id <input name="org_id" type="text" size="8" value="@org_id" title=""> <button name="save" class="save_org" onclick="save_form(this.form);return false;">Save</button> <button name="cancel" class="cancel_org" onclick="cancel_form(this.form);return false;">Cancel</button> </form> I have a menu at the bottom of my page and want the menu item to be highlighted when the visitor is on that particular page so they know where they are. I want to embed this on a couple of pages because I have built a top level menu with drop downs using p7's Pop Menu Magic. Those menu items are highlighted when one is on a certain page. I don't know if I can do this by embedding. Could someone help me please. To see the example go to: www.coloradofoxden.com/deckscapes/index.html. The links at the bottom are what I am trying to fix. Thanks. I have a css list menu which uses background images in place of bullets. What I'd like is for the user to visit the 'about' page and have the 'about' links background image be different from the rest. So the user can see from looking at the menu, what page they are on. Anyone able to suggest any methods of doing this? Would be appreciated =D Hi, Is there any way to change the color of the menu text for that current page? For example when I'm on the 'About Us' page on my website, I want the text to be blue or #00175d to be precise. I am not very good at coding or editing HTML/CSS, so I don't know how to do this. All I know is that my website has a class on the body, and each menu item has a unique ID. My website is: http://firstcareambulance .org/ Any help is appreciated. Thanks If you go here company.com layout It looks correct in IE or Firefox But in Chrome/Opera the text is a different Font and is bigger and it messes stuff up. Here is the CSS where font is defined for body. All other elements are defined with the same Font declaration. body { background: #e3edc2; color: #333; font: .8em, arial, helvetica, sans-serif; margin: auto; padding:0px; } |