HTML - Adding :hover And <a> To Div
Hi All,
After hours of searching, I have yet to find a solution to my problem so I am turning to you all for advice. Here is what I am trying to accomplish - I would like to add an event to a <DIV> to make the background image change when the user mouses over the <DIV>. Further, I would like to turn the entire <DIV> into an <A>, so that no matter where the user clicks in the <DIV> they will be taken to a new page. The two obstacles I am running into are semantics and support. Simply wrapping the <DIV> in an <A> tag does not work because the browser does not interpret <A> as a containing element. Inserting the <A> inside the <DIV> I run into the same problem - the <A> just sits at the top of the page and does not contain anything. As for the event - :hover would suffice if IE5 & 6 supported it for <DIV>, but as we all know this is not the case. Since 60% of users are still running this [expletive] browser, I need to find a workaround. My guess is that there is JavaScript somewhere that will solve my problem - but I have not found anything yet. Can anyone direct me to an article or other resource that offers some info on the aforementioned? Or has anyone done this themselves that can offer a few pointers? Thanks in advance! Similar TutorialsI've made a small icon that I want to show on the left side of each link in my menu when the arrow is over it. Haha, hard to explain In my menu, I dont want the icon on the left side of the links to be visible until the arrow is over the link. What do I do? Put the image tag in front of every link, and use the a: hover (in the stylesheet) to decide when I can see the icon? Is this even possible? It is the same icon that should be shown next to every link. Hello, I am a pretty good coder, But I'm stuck on something I have never tried before.. When I hover the div the text doesn't display (Using display:none unhovered, display:block onhover) The code is below. HTML Code: div.container > div.text { padding: 5px; width: 300px; height: 100%; display: none; } div.container > div.text:hover { display: block; } <div class="container"> <div class="text"> </div> </div> When I don't use "display" the text displays but it goes over the width I want it too here is the code alittle like this ... (my bad ascii art) Code: ---------- | xxxxxxxx|xxxxxxx | | ---------- Does anyone have an idea how I could fix this? If I didn't explain clearly I'm sorry its nearly 3am... -Daniel Hi All Below works in Firefox, Safari but not IE6 - Is it possible (We can't upgrade to 7 or above ) Is there any thing I can do ? <head> <style type="text/css"> <!-- .showdata, .showdata ul {padding: 1; margin: 0; list-style:none;} .showdata a {display: inline-table; width: auto px;} .showdata li {float: left; padding: 1px 8px 2px 0px;} .showdata li ul {position: absolute; background: #FFF399; padding: 1px 1px 1px 4px; width: auto px; left: -9999px;} .showdata li:hover ul {left:auto; } .red {color: #ff0000;background-color:#6495ed; align=right} .blue {color: #6495ed;background-color:#c50020; align=right} --> </style> </head> <html> <body> <ul class="showdata"> <li><a href="#">jimmy Smith</a> <ul> <div> <li><a ><table> <tr class="showdata"> <td style="color:red" align=right>country: </td> <td style="color:blue">UK</td> </tr> <tr> <td style="color:red" align=right>Area: </td> <td style="color:blue">England</td> </tr> </table></a></li> </ul> </li> </ul> </td> </tr> </table></div> </body> </html> Hey all. I'm not exactly sure how to explain what I want. lol. I've seen it on sites before, but can't think of a particular site to point to. But I can explain! On some sites, you might be reading an article or something, and there is a word that is underlined and turned into a link i.e. I'll be reading an article about animals, and the word "gorilla" will be a link and when you hover over it, it will either show you a definition, or point you to a wikipedia article of "gorilla." Does anybody know what I'm talking about? I really want to implement this into a forum of mine that will point members to, if nothing else, a definition of what a commonly used word is. Any clues? thanks! Hi it is possible to have a pop up appear when the mouse is passed over an image/link Also is this code complecated code because im only a novice. thanx. Alright, I've been attempting to redesign my website without any templates, just from my own personal design. And I've got to say, I'm impressed with myself on just how great it's coming together. But of course, it was too perfect for far too long, so the problem gods had to give me a giant hard problem to deal with. Anywho, my text is not aligning correctly inside of it's navigation container <LI>, Rather hard to explain, but it's easier to show you. In the left column, you'll see a thing that says "latest tutorials", and of course, the text is aligned toward the bottm, despite the fact I put a vertical-align: middle in the CSS. You can view the markup + the CSS in the source. All of the CSS is in the source, I haven't moved it to a new file yet. My problem isn't as bad in IE, but it's still there, in firefox it's just flat out terrible. I added a border around the <LI> so you can see where everythings positioned. Thanks for any help in advanced. Ok so i have the hover box working i see the pictures I see the text. However I cant figure out how to change the font style please help.
HTML Code: <html> <head> <title>MARK-10 Force Gauge Series BG</title> <link rel=stylesheet href="../../stylesheet2004.css" type="text/css"> <script src="../../jquery.js" type="text/javascript"></script> <script src="../../main.js" type="text/javascript"></script> <style type="text/css"> <!-- p{ clear:both; margin:0; padding:.5em 0; font:Arial, Helvetica, sans-serif; } pre{ display:compact; font: 100%, Arial, Helvetica, sans-serif, monospace; padding:10px; border:1px solid #bae2f0; background:#e3f4f9; margin:.5em 0; overflow:auto; width:800px; } img{border:none;} ul,li2{ margin:0; padding:0; } li2{ list-style:none; float:bottom; display:inline; margin-right:10px; font-family:"Arial Black", Gadget, sans-serif; } /* */ #preview{ position:absolute; border:1px solid #ccc; background:#333; padding:5px; display:inline-table; color:#fff; } title{ font:Arial, Helvetica, sans-serif; } --> </style></head> <td width="8" class="divid" id="spacer"> </td> <td width="671" id="content_table"> <h1><strong>QUICK-CHANGE GRIP ADAPTERS</strong></h1> <p>These unique adapters mount between a force gauge loading shaft and a grip, providing several useful benefits:</p> <ol> <li>Simply and quickly change grips, ideal for laboratory and other environments with multiple test applications. </li> <li>Prevent grip rotation about the loading shaft, eliminating the need to manually adjust grips. </li> <li>Align grips with respect to the force gauge, ensuring that samples are tested in a consistent manner.</li> </ol> <p>Models AC1033-1 and AC1033-2 include all the attachments and hardware necessary to mount one grip to a force gauge loading shaft. Attachments for grips only are also available. </p> <p><strong style="color: #F00">Note:</strong> These attachments are compatible only with Mark-10 Series 5 digital force gauges.</p> <h2> </h2> <table width="658" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="38%"><img src="../accessories/quick-change-3-closeup.jpg" width="250" height="250"></td> <td width="62%"><p class="menuheader" style="font-weight: bold; color: #0E4AB1;">Photo Gallery (Mouse Over Pictures)</p> <ul> <li2><a href="../accessories/quick-change-3lg.jpg" class="preview" title="Shown mounted between a Series 5 force gauge and <br> a G1021 curved padded attachment." ><img src="../accessories/quick-change-3sm.jpg" alt="gallery thumbnail" /></a></li2> <li2><a href="2.jpg" class="preview"><img src="2s.jpg" alt="gallery thumbnail" /></a></li2> <li2><a href="3.jpg" class="preview"><img src="3s.jpg" alt="gallery thumbnail" /></a></li2> <li2><a href="4.jpg" class="preview" title="Lake and a mountain"><img src="4s.jpg" alt="gallery thumbnail" /></a></li2> </ul></td> </tr> <tr> <td height="195" colspan="2"><p><img src="../../images/hd-ordering.gif" width="280" height="15"></p> <hr size="1"> <table width="658" > <tr> <td width="82" class="tableheader1">Model No.</td> <td width="480" class="tableheader1">Description </td> <td width="80" class="tableheader1">US Price</td> </tr> <tr> <td class="model_c">AC1033-1</td> <td class="data_c">Quick-change adapter, complete kit, #10-32</td> <td class="price_c">$125.00</td> </tr> <tr> <td class="model_c">AC1033-2</td> <td class="data_c">Quick-change adapter, complete kit, 5/16-18</td> <td class="price_c">$125.00</td> </tr> <tr> <td class="model_c">AC1034-1</td> <td class="data_c">Quick-change adapter, grip attachments only, #10-32</td> <td class="price_c">$75.00</td> </tr> <tr> <td class="model_c">AC1034-2</td> <td class="data_c">Quick-change adapter, grip attachments only, 5/16-18</td> <td class="price_c">$75.00</td> </tr> </table></td> </tr> </table> <p> <p><br> </p></td> </tr> </table> <table border="0" width="98%" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> </table> <br><br> <script language="javascript" src="../../bottomnav.js" type="text/javascript"></script> <!-- Start SuperStats code version 2.0f. Do not alter this code! http://www.superstats.com --> <script language="JavaScript"> var code = " "; </script> <script src="http://code.superstats.com/code?u=bfridman"> </script><script language="JavaScript"> document.write(code); </script><noscript> <a href="http://stats.superstats.com/c.cgi?u=bfridman" target="_top"><img src="http://stats.superstats.com/b.cgi?u=bfridman&z=1" border=0></a></noscript> <!-- End SuperStats tracking code. --> </body> </html> Can someone direct me to a website that shows types of hover links. I am looking to link to a small page when hovered on link in the same page. Thanks in advance, Hello, I have this simple slideshow as can be seen here. It currently contains 2 images. Works good in all browsers except IE9.. as soon as I move my mouse-cursor near it, it freezes! Hope someone can locate the conflicting issue(s), thanks. ps - tested in IE 7, IE 8 and IE 9.. only 9 fails. Hi every body, i have i simple square div : A with 3 other small divs : x, y and z i want when i hover x or y or z the Photo in the div A CHANGES ... in order to do that (Without using Java Script : Only Html + css), i think about using the normal hover, but this time with partitionning the area over witch the mouse hover ... suppose that we have an area divided with horizontal and vertical axes ... and we want that each time the mouse hover some part, the effect occures in some div ... Can i do that without JS (html + css) Thanks to any usefull help First off, I have designed one site ever and it's still in progress. I also have no basis in computer training other than graphic design. I am a total beginner, but the site I'm designing is for my personal business, so I'm continually updating it with new features I like. I was hoping to use hover menus (I have no idea if that is the technically correct term, but when you put your mouse over a link, it gives you a drop down menu) on my site, but really have no clue how to do that. Is it possible in HTML or would I have to use javascript or flash? If so how would I incorporate the code into a generally HTML based site? Thanks! :-) Hi Guys, I'm creating a small music website with some songs / lyrics for guitar etc. Is it possible to have some text (eg- a guitar chord like C) and when you hover your mouse over the text, it displays a small image of the chord ? Any help would be greatly appreciated, Thanks, Emma I would like to have a single word which on hover displays a box with some details. I know I could do this crudely using an image for the word, and having the 'alt' text contain the details wanted on hover. What is the correct way of doing this? Ta muchly! how do I add this: http://qrayg.com/learn/code/qtip/ to this page: http://www.paulodourado.com to get something similar to this page: http://www.jorycordy.com i have no idea where to "plug things in" im extremely new to this, thank you in advance Hi Guys, Just have a look at http://allfreetemplates.info/view-co...late-1098.html i wanted a effect of bullet which is there on this page. Can we do that effect in HTML without giving <a></a> tag? If yes that how? Thanks in advance... im rather new to html coding so forgive me for being so nub at this. I have a website for my friend and i thought by making the navigation menu have a mouse over effect it would help make the website a lot more presentable. i used this technique to create the mouse over effect. i then used this technique to pre-cache the images onto the user's pc so that the images don't flash when first hovered over. everything seemed to work fine on my computer (i used firefox 3.x) but then i loaded up the page on internet explorer 8.x.. at first the image mouse hovers work fine but when the image is clicked the image dissapears and is replaced by text. i added a:name:visited to fix that issue but now after it is clicked the hover stops working.. is there any way to fix this? here is the website so you can open it with iexplorer and see what i mean.. just click any of the navigation buttons. Analog Knights SOLVED Here are 2 text documents. 1 is CSS and the other is the HTML doc that refers to it. HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>TryingHoverClass</titl> <link rel="stylesheet" type="text/css" href="liKS.css"></link> </head> <body> <p>Here is a list</p> <p> <ul style="width:80px; border:1px solid red;"> <li>yahoo <span><a>bob</a></span> </li> <li><a href="http://www.google.com">Google</a></li> </ul> </p> </body> </html> CSS: li:first-child:hover { color:teal; } li span { display:none; } li:first-child:hover span { display:block; position:absolute; background-color:red; border:1px solid yellow; width:50px; height:60px; left:150px; } This is nothing fancy, however when i use firefox to view these files, they act as expected. When i use IE7, nothing <----- comes up in the window. I get a blank page. Where is the error? Thanks, Bo I have a table with 5 images in one row. In 4 of them the four images are of words for a navigation bar. Each word is black and right below it is the same word in color. When the mouse hovers over the four words I would like the image to raise up so that the colored words are shown. Here is what I have so far: Code: <table> <tr> <td><a href="" target="_new"><img src="menu/Logo.png" width="139" height="155" alt="Back to home page" border="0"></a></td> <td><a href="" target="_new"><img src="menu/Drafting.png" width="98" height="65" alt="Drafting" border="0"></a></td> <td><a href="" target="_new"><img src="menu/Programming.png" width="157" height="65" alt="Programming" border="0"></a></td> <td><a href="" target="_new"><img src="menu/Resume.png" width="93" height="65" alt="Resume" border="0"></a></td> <td><a href="" target="_new"><img src="menu/Contact.png" width="96" height="65" alt="Contact" border="0"></a></td> </tr> </table> Is it possible to move the images like this or do I need to use a background image instead? I just can't figure out how to do this. On this site he http://mindfulmoneycoaching.com/ the horizontal buttons hover a darker blue. A few of them drop down to show more menu links and when those are hovered a little orange bullet point is shown. However when hovering over the dropped down links I'd like the parent link above to stay that dark blue color. Anyone know how to do that? I want to have a menu at the top of the screen and then when you mouse over a section a drop down menu appears with links. EDIT: how can I position the menu so it's at a specific part of the screen? |