CSS - Hover Effect On A Td Link
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. Similar TutorialsIm trying to a hover effect with css kinda like the one here http://tabbywrocks.tumblr.com/ on images. i was wondering if anybody could give me a site to some example code that i could look at or something. i looked a bit myself but i couldnt find anything that had exactly what i wanted. Im hoping you don't need JavaScript for it but i think you might Having trouble with using CSS for email link. The problem is that mouse hover produces a black background - this is the intention. However, after clicking on link to open email client, the link (on that page) doesn't have the balck background effect. Other pages in the site are OK - until I click them once. Am I missing a section from the css file below that would give me the same hover effect even after the action of clicking the mailto: link has been done? Many thanks a:link.link1 { color: #CDBC75; text-decoration: none; background-color: transparent } a:visited.link1 { color: #CDBC75; text-decoration: none; background-color: transparent } a:hover.link1 { color: #CDBC75; text-decoration: none; background-color: #000000 } a:active.link1 { color: #CDBC75; text-decoration: none; background-color: transparent I just got done with the second CSS tutorial for today. Please drop a comment telling me what you think. http://www.majd-gfx.com/tutorials.php?cmd=view&cat=css&id=16 Hello, First, I am new to webcoding so I apologise if what I am asking is too stupid. I am doing a little navigation bar for my blog with the hover effect. My problem is that the hover effect only work when I use {display: block;} but I need it to be inline, because when doing {display:block} it displays vertically. However when I do {display: inline-block;} the list items do show up inline horizontally but they show up only as images, neither does the hover effect or the links work. Second, in IE and in chrome it displays differently. Thank you very much for all the help! Also, here is the code! CSS #header-wrapper2{ height:80px; width:580px; margin:0; float: right; background-color: #000000; } #header-wrapper2-navbar{ height: 40px; width: 243; margin-top:40px; margin-left: 3px; padding:0; } #header-wrapper2-navbar li{ margin:0; padding:0; } #header-wrapper2-navbar li,#header-wrapper2-navbar a{ height: 40px; display: block; } #news{ left:0px; width:78px; background: url('') 0 0; } #news a:hover{ background: url('') 0 -44px; } #products{ left:78px; width:88px; background: url('') -78px 0; } #products a:hover{ background: url('') -78px -44px; } #about{ left:166px; width:77px; background: url('') -166px 0; } #about a:hover{ background: url('') -166px -44px; } HTML <div id='header-wrapper2'> <ul id='header-wrapper2-navbar'> <li id='news'><a href='()></li> <li id='products'><a href='></li> <li id='about'><a href='></li> </ul> </div> I've been getting quite confused as to why some CSS wasn't doing what I'd expected it to do. I have code like this: Code: .tBox { width: 50px; height: 50px; } .tHeader { opacity: 1 } .tBox:hover .tHeader { opacity: 0.5 } I then have my DIVs like this (simplified) Code: <div class="holder"> <div class="section1"> <div class="tBox"> </div> </div> <div class="section2"> <div class="tHeader"></div> </div> </div> So what I was expecting to happen is that when someone hovered over "tBox" then "tHeader" would switch opacity. But it wasn't. And I believe this is because tBox and tHeader aren't in the same parent. I read somewhere something about using a "+" to do some special selector stuff in the CSS but didn't really understand. Can someone please help me with how I can get this to work outside of them sharing their parent. Thanks. I'm the processing of redesigning a website that uses hover effect on a button (like button images changes when you put your mouse over it and when you click it, it goes to a different page). Now that works fine if you're on a a desktop/laptop computer. But on a tablet, the hover/onmouseover effect does not work. On a tablet, when clicking the button image, it changes briefly and then immediately goes to a new page. What are methods and techniques where a website can detect if a visitor comes from a tablet or not? Then would it be possible to switch to a tablet CSS version? Or, are there tablet framework (i.e. Modernizer?) that can help with this process? i have the following css: Code: .table1 { border-collapse: collapse; width: 50%; margin: 24px; font-size: 1.1em; } .table1 th { background: #3e83c9; color: #fff; font-weight: bold; padding: 2px 11px; text-align: left; border-right: 1px solid #fff; line-height: 1.2; } .table1 td { padding: 6px 11px; border-bottom: 1px solid #95bce2; vertical-align: top; } .table1 td * { padding: 6px 11px; } .table1 tr.alt td { background: #ecf6fc; } .table1 tr.over td, tr:hover td { background: #bcd4ec; } However all tr and td's now getting a hover effect. i tried several methods but I'm to unpracticed with css. Grtzz whitehat i know that IE doesnt support the :hover being added to anything but links, is this the same with :active? was just wondering whether i could have a style change when the user clicks on a form button 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 have the following code, but the CSS file that I have already defines link and hover to be something else Is there a way I can edit the div#hdr_cnt to have it's own definition of the hover and link? Thanks for the help Code: div#hdr_ctr { width:100%; min-width:670px; background-color:#FFF; overflow:hidden; margin:0; padding:0; text-align:center; color:#000000} div#hdr_cnt { background: url('http://www.hobbyspeed.com/header/hobbyspeed.jpg') no-repeat center; width:670px; height:73px; margin:0 auto; padding:0;} div#hdr_cnt ul.l { float:left; margin:15px 0 0 18px; padding:0; list-style-type:none; direction:rtl; text-align:right; color:#000000} * html div#hdr_cnt ul.l { margin-left: 9px; color:#000000 } div#hdr_cnt ul.r { float:right; margin:15px 0 0 20px; padding:0; list-style-type:none; direction:ltr; text-align:left;} 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... 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 Hello I would like to make a hover effect when my mouse is over a link, as shown in my attachment. What I want is, as shown in the attachment (at design time), when I hover on any link, two horizontal lines are added at the top and bottom of that specific link, and a slight black transparency appears as well as a highlighter (not the text of the link, and by default the background will be slightly grayed). Anyone can help me with this? Edit: even if the black transparency does not appear is not a problem, but how to implement the two lines? Am using only css and html here, no javascript or any other libraries. Is it possible to have a link where the user rolls their mouse over it, and an image appears on top of it? I tried setting it as a background image, but it only fills the background of the text. 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. I wish to have links for the menu like this: http://www.tristarwebdesign.co.uk/templates/templates/karma/index.html However, I wish to have MY OWN font style on each links as it can be seen on: The only difference I want is that this guy has used "title" in order to display text on each "li" link, while I would like to use MY OWN font style instead as can be seen from my page on: http://members.lycos.co.uk/darsh25/Personal%20Website/contact.php i.e. the font style that can be seen in links like About, Services, Owner, Template & Contact. Code: <li><a title="link six" href="index.html">link six</a></li> <li><a title="link five" href="index.html">link five</a></li> <li><a title="link four" href="index.html">link four</a></li> <li><a title="link three" href="index.html">link three</a></li> <li><a title="link two" href="index.html">link two</a></li> <li><a title="link one" href="index.html">link one</a></li> My links are saved as an "image" (both background & the text on it) & as far as I'm aware, I couldn't possibly "hover" EACH INDIVIDUAL image of EACH of these links using CSS, could I ??? I know that I could "hover" change the background colour, but then what about the text on it ??? Is it possible to use the same fancy font AND being able to change the background colour when hover to "grey" (just as it could be seen from the "tristar" website. My CSS code so far is: Code: /* CSS Document */ body { background-color:black; background-attachment:fixed; } /* .................................... HEADER & FOOTER ................................... */ #header { font-family:Georgia, "Times New Roman", Times, serif; color:white; text-align:center; width:100%; } #header a { color:yellow; text-decoration:none; } #header a:hover { text-decoration:underline; } #footer { font-family:Georgia, "Times New Roman", Times, serif; color:white; text-align:center; border-top:3px solid fuchsia; float:left; background-color:black; width:100%; } #footer a { color:yellow; text-decoration:none; } #footer a:hover { text-decoration:underline; } /* ........................................ BANNER ........................................ */ #banner { width:100%; border:none; text-align:center; background-color:none; } /* ......................................... TOP MENU .................................... */ #topMenu { width:100%; float:right; border:none; } #topMenu ul { float:left; margin-left:4%; } #topMenu ul li { display:inline; width:20%; } /* ................................... CONTENT ................................................ */ #leftContent { float:left; width:10%; border:1px solid red; background-color:green; } #centerContent { background-color:white; width:75%; margin-left:1%; float:left; border:1px solid green; } #centerContent ul { font-family:Georgia, "Times New Roman", Times, serif; text-align:justify; list-style-type:decimal; color:black; } #centerContent li { margin:3% 3%; line-height:1.5em; } #rightContent { float:right; background-color:fuchsia; border:1px solid red; width:10%; } /* ................................... STYLES ......................................... */ p.first-letter:first-letter { color:red; margin-left:5%; font-size:xx-large; } p { font-family:Georgia, "Times New Roman", Times, serif; text-align:justify; font-size:medium; line-height:1.5em; margin:2% 3%; color:black; } h4 { font-family:Georgia, "Times New Roman", Times, serif; text-align:center; font-size:x-large; color:green; } h5 { font-family:Georgia, "Times New Roman", Times, serif; text-align:justify; font-size:medium; margin:2% 3%; color:blue; } h6 { font-family:Georgia, "Times New Roman", Times, serif; text-align:justify; margin:0; font-size:medium; font-weight:normal; color:red; } .italic { font-family:Georgia, "Times New Roman", Times, serif; text-align:justify; color:black; font-style:italic; } .bold { font-family:Georgia, "Times New Roman", Times, serif; text-align:justify; color:black; font-weight:bold; } .colorTextRed { font-family:Georgia, "Times New Roman", Times, serif; text-align:justify; color:red; } .colorTextBlue { font-family:Georgia, "Times New Roman", Times, serif; text-align:justify; color:blue; } .colorTextGreen { font-family:Georgia, "Times New Roman", Times, serif; text-align:justify; color:green; } /* ................................... TABLE ......................................... */ #contactTable { background-color:white; border-spacing:2%; margin:3% 3%; font-family:Georgia, "Times New Roman", Times, serif; text-align:left; } #contactTable tr { border:none; } #contactTable th { color:fuchsia; } #contactTable td { font-size:medium; color:black; } /* ................................... CLASSES ......................................... */ .table { background-color:white; border-spacing:2%; margin:3% 3%; font-family:Georgia, "Times New Roman", Times, serif; border-collapse:collapse; text-align:left; } .tr { border:none; } .td { border:thin solid red; font-size:medium; padding:2px; text-align:center; color:black; } Hi there, I have a script that displays content when a link is hovered on which then hides when the mouse is hovered off it. Is there a way to make it so the content stays there until one of the other links is hovered on? This is my CSS: PHP Code: div#links a span {display: none;} div#links a:hover span {display: block; position: absolute; top: 200px; left: 0; width: 125px; padding: 5px; margin: 10px; z-index: 100; color: #AAA; background: black; font: 10px Verdana, sans-serif; text-align: center;} div#links a:hover {color: #411; background: #AAA; border-right: 5px double white; } and this is the HTMl PHP Code: <div id="links"> <a href="http://www.meyerweb.com/eric/css/">Link 1<span>1</span></a> <a href="http://www.meyerweb.com/eric/css/">Link 2<span>2</span></a> <a href="http://www.meyerweb.com/eric/css/">Link 3<span>3</span></a> </div> Any ideas? Hi, I have a link and an image next to each other. I want to make the link hovered when I do mouseover on image. How do I do that ? Here is the code I have now. <a href="javascript:undefined" id="imageLinkId">GMNA</a> <script language="javascript"> if( ... ) { document.write('<img src="/graphics/channel/plus.png" id="div18Img" alt="Maximize this section" onMouseOver= >'); } else { document.write('<img src="/graphics/channel/minus.png" id="div18Img" alt="Minimize this section" onMouseOver= >'); } </script> Thanks |