CSS - A:link, A:visited, A:hover Not Working On Certain Div Tags
my layout is pretty simple...
Code: <div class="container"> <div class="topbar"> <div class="list"> <div class="gametitle"></div> <div class="percentage"></div> <div class="system"></div> </div> </div> i have the following CSS applied to gametitle, percentage and system... for somereason, gametitle doesnt work... Code: .gametitle { float:left; width:250px; color:#FFF; } .gametitle a:link, .gametitle a:visted, .gametitle a:hover {color:#FFF;} .percentage { float:left; color:#FFF; } .percentage a:link, .percentage a:visited, .percentage a:hover {color:#FFF;} .system { float:right; color:#FFF; } .system a:link, .system a:visited, .system a:hover {color:#FFF;} here is the page where all this code is going down... Mini Catalog Similar TutorialsI have my links, and a:hover does not activate when the link has been visited. Is there any special for a hover visted link or any way to fix this? Whew, it's been a while sin'ce i've been here. Thanks in advance! ~Brendan Having two problems, kind of related to browsers. 1) Most of the time, the site loads better under Firefox. For some reason, Firefox won't implement the text-decoration:none attribute. Any ideas? 2) Also, the on hover flip filter doesn't seem to be working in IE, which i was told was the only browser that would work in? I think I used bad syntax, but can't find it. Help would be appreciated! edit--i used the html validation and the css one, the html said I cant use the xspace and vspace in this iframe: <iframe class="fade" style="position:absolute; top:125; left:200;" src="blog.html" width="400" height="400" frameborder="0" align="left" xspace="3" vspace="3"></iframe> this is the only i frame I use, and was something I got off a frames tutorial... guess i didn't learn it well enough? was a ton more wrong with the css, but it wasn't like the html validator and telling me where i went wrong. here is the full css file: .fade{filter:alpha(opacity=70); -moz-opacity:0.7; background:#ffffff;} font, td{color:#0000FF; font-size:medium; font-family:sans-serif; font:"Comic Sans MS",Tahoma;} a,a:link,a:visited,a:hover,a:active { font-size:medium; font-weight:bold; font-family:sans-serif; font:"Comic Sans MS",Tahoma; text-decoration:none; } .link1 a:link { color:#0000FF; } .link1 a:visited { color:#0000FF; } .link1 a:hover { color:#0000FF; filter:flipv; } .link1 a:active { color:#0000FF; } .link2 a:link { color:#0000F5; } .link2 a:visited { color:#0000F5; } .link2 a:hover { color:#0000F5; filter:flipv; } .link2 a:active { color:#0000F5; } could someone please help me figure out what I did to my fonts, and where the links are preventing the underline decoration from being disabled? Thanks for taking the time to read my question. I have links on my page that when visited, change color. Simple enough. I also have in my css a hover line that says change the color to white. This works on the unvisited links, but not the visited ones. Why? Here is my css. @charset "iso-8859-1"; .text { font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #ffffff } .textCopy { font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #CCCCCC; hover: #ffffff } .textbigger { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #CCCCCC; hover: #ffffff } a:hover { color: #ffffff; } a:link { color: #999999; } a:visited { color: #747474; } a:active { color: #CCCCCC; } body { margin-top: 0; background-color: #000000; } You can see this at work at www.pierced.ca Brad Thanks for taking the time to read my question. It's been a while since I last tried making a page. I've got some images as href's and want to show a border around them on the hover. It's not working, they're just showing up as purple (default visited). This makes some sense as the links are just bookmarks on the same page. But in my css I have link, visited, and active all the same color. Only hover is different, and none of them are purple. I've read this http://www.w3schools.com/css/css_pseudo_classes.asp and I think I've got it, but it's not working. HTML Code: <a class"NavButtons" href="AssetDataDBHelpFile.htm#AssetForm"><img src="Computer.jpg" width="133" height="84" alt="Asset Management Form"></a> <a class"NavButtons" href="AssetDataDBHelpFile.htm#PeripheralForm"><img src="Peripheralbutton.jpg" width="133" height="84" alt="Peripherals Management Form"></a> <a class"NavButtons" href="AssetDataDBHelpFile.htm#ReportCenter"><img src="Report.jpg" width="133" height="84" alt="Report Center Form"></a> CSS Code: a.NavButtons:link { border-color: green; border-width: 2px; border-style: solid; } /* unvisited link */ a.NavButtons:visited { border-color: green; border-width: 2px; border-style: solid; } /* visited link */ a.NavButtons:hover { border-color: Red; border-width: 2px; border-style: solid; } /* mouse over link */ a.NavButtons:active { border-color: green; border-width: 2px; border-style: solid; } /* selected link */ Hi. Pleeease help! I've created a CSS for a CMS but I'm having a problem with text color. I wanted the links to change from black to white text when hovered over. I seem to have achived this . . . until they have been clicked, and then that function is disabled and they just stay black all the time. I tried deleting cookies and temp internet folders. I tried using the :visited option in the CSS and putting color white in it and that didn't work. Can anyone help? Good day, I am a newbie, both to CSS and to these forums. I recently undertook a job to update a website for a charity and am dealing with the previous webmasters coding, both html and css. I am trying to modernize the site a bit, it is very 1997. I am running into a bit of trouble with the hover class on one of my pages. When a link has been visited, it no longer changes color and highlights on hover. I read on multiple forums, this one included that it is because you must define hover last, after visited, active, etc. I did this, but still does not work. I am using Firefox 2. Here is the code I am working with, sorry that is is a bit lengthy, I don't know what parts are important or not because when I just change the hover, link, visted part it doesn't work. The page I am working with is at beverlyfoundation . org / library / index . html /* THE BASICS */ body { font-family: Verdana, Helvetica, Arial, sans-serif; color: #eaf5ff; margin: 0px; padding: 0px; background-color: #c2d8ec; } p { margin-top: 0px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px; } img { border: none; } a:link, a:visited { text-decoration: none; color: #EAF5FF; } a:active, a:hover { text-decoration: underline; color: #E51322; } /* HEADERS */ h1, h2, h3 { font-family: Helvetica, Arial, Verdana, sans-serif; margin: 0px 0px 14px; } h1 { font-size: 220%; text-align: right; font-style: italic; } h2 { font-size: 140%; } ul { list-style-position: outside; list-style-type: square; } /* TOP COLORED LINKS */ .navcells { text-align: center; vertical-align: middle; padding: 2px; font-weight: bold; font-size: 11px; } #navlinks a:link, a:visited { text-decoration: none; color: #EAF5FF; } #navlinks a:hover, a:active { text-decoration: underline; color: #EAF5FF; } /* LAYOUT */ #header { margin: 0px; padding: 0px; background-attachment: fixed; background-image: url(../images/header_gradient01_bg.jpg); background-repeat: repeat-x; background-position: left top; } #content { padding: 10px 20px 10px 10px; background-color: #0060BE; text-align: left; vertical-align: top; font-size: 12px; } #rightcolumn { background-color: #0060BE; padding: 10px; width: 220px; font-size: 11px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #EAF5FF; border-right-color: #EAF5FF; border-bottom-color: #EAF5FF; border-left-color: #EAF5FF; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; } #splashrightcolumn { background-color: #0060BE; padding: 10px; width: 220px; font-size: 11px; } #rightcolumn img { margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; } #rightcolumn p { margin-top: 0px; margin-right: 0px; margin-bottom: 7px; margin-left: 0px; } #rightcolumn h1 { font-size: 180%; text-align: center; font-style: italic; } #rightcolumn h2 { margin-top: 21px; margin-right: 0px; margin-bottom: 7px; margin-left: 0px; text-align: center; } #rightcolumn a:link, a:visited { text-decoration: none; color: #EAF5FF; } #rightcolumn a:hover, a:active { text-decoration: underline; color: #EAF5FF; } #threecolumn { padding: 10px; width: 220px; text-align: left; vertical-align: top; font-size: 12px; } #threecolumn a:link, a:visited { color: #EAF5FF; text-decoration: none; } #threecolumn a:hover, a:active { color: #EAF5FF; text-decoration: underline; } #footer { color: #EAF5FF; padding: 10px; font-size: 11px; text-align: left; vertical-align: top; line-height: 14px; } #footer a { color: #EAF5FF; text-decoration: none; } #address { color: #EAF5FF; padding: 10px; font-size: 11px; text-align: left; vertical-align: top; border-left-width: 1px; border-top-color: #EAF5FF; border-right-color: #EAF5FF; border-bottom-color: #EAF5FF; border-left-color: #EAF5FF; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; } #address a { color: #EAF5FF; text-decoration: underline; } #address h2 { margin: 0px; } .threecolumns { color: #EAF5FF; padding: 10px; font-size: 11px; text-align: left; vertical-align: top; } .resourcestore p { margin-top: 0px; margin-right: 0px; margin-bottom: 4px; margin-left: 0px; } .gradientrow { background-image: url(../images/footer_bg01.jpg); } .copyright { font-size: 10px; } .resourcestore { padding: 10px; } I have a thumbnail image with a link below. When hovering over the link, I want the enlarged image to pop up. I've tried it 2 ways. Both are close, but neither works the way I want it. Perhaps someone can help tweak one of these options? Option 1 is he http://concrete-creative.com/temp/print/1.html **What I don't like here is that you can hover over a big, blank area below the link and the larger image pops up. I only want the linked text [JACK IT UP] to pop the larger image up. Option 1_B is he http://concrete-creative.com/temp/print/1_B.html **The problem here is the the larger image while INVISIBLE is sitting below the text [JACK IT UP] which is pushing my HTML table too wide. Can someone help me find the happy medium between these 2 solutions so it works the way I want it to? THANKS! please please somebody help me with this... i have given my links some effects with this code: Code: <style type="text/css"> <!-- a img {border: none; } a:link { text-decoration: none; } a:hover { text-decoration: none; border-bottom:3px double; color: #000000;} a.head, a.head:link { text-decoration: none; } a.head:hover { text-decoration: none; } //--> </style> it works fine on my links, but the class "head" doesn't seem to be effecting the link with that class....it still has the same hover effect as the other links. I have class="head" in the link tag of the element, but it still doesn't work. I want no effect on this link since it is an image and I don't want a double-underline on it. The only thing I can think of is that maybe the head image isnt being effected correctly because it is an include file, but I don't think that really matters. Thanks! Good Morning! First off I am not a professional, not even close. I have been teaching myself html & css on and off for the past 6 months. Ok so here is my issue: I have a CSS rule: a:link, a:visited { display:block; font-weight:bold; color:#000; background-color:#FFF; width:200px; text-align:left; padding:10px; text-decoration:none; text-transform:uppercase; } The above rule is used on my side nav bar. My issue is now every <a href"etc.." </a> i place on my main page inherits all the above attributes. How can eliminate all the parent stuff. Ive been trying to get this working for the past 2 hours and my brain is fried.! Thanks for all your help! -Chris I am using an external CSS where I am defining the color of my links when un-visited, visited etc. The problem is in Netscape 7.1/7.2 those links which are calling my other pages, are being shown up as visited when clicked,. But those where I say href='javascript:void(0);my js function' are not being shown with the correct 'visited' link color. They are being shown in the color specified for 'un-visited' links!! Can someone help?? I have another problem with IE for Windows: I have several links which should not appear as links but should inherate the colors (grey or black) and decoration (none) from their parents ... works fine every where except MSIE for windows (where the usual red and blue - but no underline - appear) the relevant styles: <style type="text/css"> a:link { text-decoration: none; color: inherit; } a:visited { text-decoration: none; color: inherit; } </style> the relevant html: <h3 style="padding: 0; margin: 0.25em;color:#000000; ">Some <a href="http://www.theDanceGypsy.com/danceFinder.shtml" target="viewFrame">Dance Events</a> near you:</h3> <ul class="newsList"> <li><a href="http://www.thedancegypsy.com/danceList.php?dance=dance-26:6-4" target="viewFrame"><span class ="unconfirmed">6/25: Bernardston~ <cite>Eastern Squares</cite> </span></a></li> <li><a href="http://www.thedancegypsy.com/danceList.php?dance=dance-30:6-4" target="viewFrame">6/26: Brattleboro~ <cite>Paneurhythmy</cite> </a></li> anyone have any idea for a workaround? Thanx I have some listing text that comes from a database, displayed in a column. Each block of text is enclosed in a DIV tag. I use the following to cause the area of the text to change background color when there is a mouseover: Quote: div.list { padding: 5px 5px 5px 5px; } div.list:hover { background-color: #FFFACD; } Works fine for Firefox, but doesn't do anything in IE. How can I fix this so it works in IE as well? <div style="blah"> What would be used to put :hover in the style tag in place of 'blah'? Hi, I am trying to get a hover to work with my links. The problem is when i have a list-style-type in css. When that exists, the link text for each link goes behind the bullets instead staying to the right of them. What do i need to do to have a list-style and the hover effect hovering over the links? I have a drop down menu located at http://www.fieldspianos.com/new/index.php If you hover over the menu items they turn black and white when you are right on the text but not if you are in the area surrounding it which is what I also need to occur. You can view the source on the page for the html but I will include the css below. This is the basic layout of the menu: Code: <ul> <li>About Us</li> <ul> <li><a href="#">Locations</a></li> etc..etc..etc.. Here is the css: Code: /*Begin Content of drop down menu*/ a { outline:none; } * html div#dropdownmenu ul { float: left; } * { margin: 0; padding: 0; } div#dropdownmenu { float: left; background-color: #C8C6C6; font-size:11px; font-family: Verdana, Arial, Helvetica, sans-serif; } div#dropdownmenu ul li { list-style-type: none; float: left; background-color: #000000; position: relative; } div#dropdownmenu ul li:hover { list-style-type: none; background-color: #000000; } /*Hides drop downs when not overed over and reveals them when they are hovered over.*/ body div#dropdownmenu ul li ul { display: none; } body div#dropdownmenu ul li:hover ul { display: block; } div#dropdownmenu ul li ul { margin: 0; width: 13em; position: absolute; left: -1px; } div#dropdownmenu ul li ul li { width: 100%; background-color:#bdb35e; color: #660000; border-bottom: 1px solid #000; border-left: 1px solid #000; border-right: 1px solid #000; padding: 3px; } div#dropdownmenu ul li ul li:first-child { border-top: 1px solid #000; } div#dropdownmenu ul li ul li:hover { color: #FFFFFF; background-color: #000000; } div#dropdownmenu ul li ul li a { color: #660000; text-decoration:none; outline: none; } div#dropdownmenu ul li ul li a:hover { color: #FFFFFF; background-color: #000000; text-decoration:none; outline: none; } div#dropdownmenu ul li:hover ul, div#dropdownmenu ul li ul:hover { display: block; } Any help is greatly appreciated, this seems like it would be a simple fix but I can't figure it out. Maybe I am overlooking some small detail. Thanks! Hello, The hover link looks good on IE7 and FF but not on IE6 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=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> #header_navigation { background-color:#0000FF; position:absolute; float:left; font-size:11px; color:#FFFFFF; font-weight:bold; left:190px; top:130px; width:145px } #header_navigation ul { border:1px solid #FF0000; float:left; list-style-type:none; margin:0 30px 0 0; } #header_navigation li { width:145px } #header_navigation li:hover { background-color:#FFFFFF; } #header_navigation a { text-decoration:none; color:#ffffff; background-color:none; } #header_navigation a:hover { color:#000000; background-color:#FFFFFF; width:145px } </style> </head> <body> <div id="header_navigation"><!--begin of header_navigation--> <ul> <li><a href="index.asp">Home</a></li> <li><a href="#">News</a></li> <li><a href="#">Forum</a></li> <li><a href="blog.asp">Blogs</a></li> <li><a href="shoutbox.asp">Shoutbox</a></li> <li><a href="#">Testimonials</a></li> <li><a href="#">Photo Gallery</a></li> <li><a href="#">About Us</a></li> </ul> </div> </body> </html> Not sure what this is referred to. I checked my dhtml book but its from 2000! I want to apply link, visited, hover, active to below code: Code: #print_category { position: absolute; left: 35%; top: 30%; font-size: 13px; text-align: left; line-height: 2 ; margin-right: 5em; } Properties I want to apply: A:link {color: #000099; text-decoration: underline; } A:visited {color: #000099; text-decoration: none; } A:hover {color: #000099; text-decoration: none; } A:active {color: #000099; text-decoration: none; } How can this be done, Ive tried but to no avail: - A#print_category:active {color: #000099; text-decoration: none; } Thanks! I am attempting to create a link on a page that will only appear when it is hovered upon. This is to direct an administrator to an admin page. Here is what I have attempted so far to no avail: Code: div.headleft { text-align: right; width: 100%; } div.headleft a:link { display: none; } div.headleft a:visited { display: none; } div.headleft a:hover { display: block; background: inherit; color: #ff0000; } div.headleft a:active { display: none; } I have tried a few variations to the above snippet of code and am at my wits end... My gratitude ahead of time... I'm trying to have a hover effect on a link within a <td> tag. In firefox it works fine, but in IE it's not working. I wasn't sure if there's a special property in CSS to get it working. My CSS code is: Quote: .leftblock a{display: block; border-top: 1px solid #ffffff; font-weight: bold; color: #21536A; text-decoration:none; background-color:#CCCCFF; } Quote: .leftblock a:hover{border-top: 1px solid #cccccc; background-color: #DDEEFF; font-weight: bold; text-decoration: none; } I added display:block to the a:hover class as well to try that to no avail. http://www.sassyproducts.com/hover.php is where you can see what I'm working on. If you hover over anywhere on the first link, Fundraising, it adds the hover effect, but the other ones will only show the hover effect if you hover over the text. This is in IE. In FF, it works properly. Any ideas what I may need to add or change?... Thanks. My layout contains a vertical navigation bar. It is split up into individual images. I have created a table to organize the sliced images. I am using CSS to create a hover effect. When you mouseover the table cell, the backgroudn changes (and changes back when the mouse is removed.) This is all peachy, but is it possible for me to change the colors of the text within that table cell along with the background. Heres the CSS: Code: .link_hover1{ background-image: url("images/link_img_01a.jpg"); background-repeat: repeat-n; cursor: pointer; width: 170px; height: 44px; } td.link_hover1:visited{ background-image: url("images/link_img_01a.jpg"); background-repeat: repeat-n; cursor: pointer; width: 170px; height: 44px; } td.link_hover1:hover{ background-image: url("images/link_img_01b.jpg"); background-repeat: repeat-n; cursor: pointer; width: 170px; height: 44px; } td.link_hover1:active{ background-image: url("images/link_img_01a.jpg"); background-repeat: repeat-n; cursor: pointer; width: 170px; height: 44px; } I tired implementing the font-color property. No use. does this have something to do with my 'td' selector? I have a feeling that this is the problem. |