Search the Community

Showing results for tags 'hover'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH


  • Community Calendar




Website URL








Found 22 results

  1. Hi! I am reading the HTML5 tutorial from All the examples I've tried have worked well, but not the following one: I want to change the link colours of one of my pages. The "visited", "active" and "hover" are working, but not "link", I don't know why. Could anyone help? This is what I have put in a .css file: <style> a:link { color: black; background-color: transparent; text-decoration: none; } a:visited { color: red; background-color: transparent; text-decoration: none; } a:hover { color: green; background-color: transparent; text-decoration: underline; } a:active { color: yellow; background-color: transparent; text-decoration: underline; } </style> Thanks!
  2. Hello, I can't figure out how to pause my animation when the cursor hovers over the slide. Here is my code: <!DOCTYPE html> <html> <title>W3.CSS</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href=""> <style> .mySlides {display:none; height:130px} .w3-left, .w3-right, .w3-badge {cursor:pointer} .w3-badge {height:13px;width:13px;padding:0} </style> <body> <div class="w3-content" style="max-width:600px"> <div class="mySlides w3-animate-right" > <p>I really enjoyed my experience at LIV. The staff are very professional and friendly. I will be sure to refer some friends</p> <p> -Shaun <p> </div> <div class="w3-content" style="max-width:600px"> <div class="mySlides w3-animate-right"> <p>I have been welcomed by everyone and shown many kindnesses, along with hints of places to go, things to do and even assurances of safety on the streets as I walked home after the evening sessions. I came, I learned and I grew in my practice. I found peace. You have all carved a big space in my heart.</p> <p> -Debbie <p> </div> <div class="w3-content" style="max-width:600px"> <div class="mySlides w3-animate-right"> <p>I thoroughly enjoyed my first class. Looking forward to trying out the other classes soon. Thank you!</p> <p> -Lorna <p> </div> <div class="w3-center w3-container w3-section w3-large w3-text-white" style="width:100%"> <div class="w3-left w3-hover-text-khaki" onclick="plusDivs(-1)">&#10094;</div> <div class="w3-right w3-hover-text-khaki" onclick="plusDivs(1)">&#10095;</div> <span class="w3-badge demo w3-border w3-transparent w3-hover-white" onclick="currentDiv(1)"></span> <span class="w3-badge demo w3-border w3-transparent w3-hover-white" onclick="currentDiv(2)"></span> <span class="w3-badge demo w3-border w3-transparent w3-hover-white" onclick="currentDiv(3)"></span> </div> </div> <script> var slideIndex = 1; showDivs(slideIndex); function plusDivs(n) { showDivs(slideIndex += n); } function currentDiv(n) { showDivs(slideIndex = n); } function showDivs(n) { var i; var x = document.getElementsByClassName("mySlides"); var dots = document.getElementsByClassName("demo"); if (n > x.length) {slideIndex = 1} if (n < 1) {slideIndex = x.length} for (i = 0; i < x.length; i++) { = "none"; } for (i = 0; i < dots.length; i++) { dots.className = dots.className.replace(" w3-white", ""); } x[slideIndex-1].style.display = "block"; dots[slideIndex-1].className += " w3-white"; } var myIndex = 0; carousel(); function carousel() { var i; var x = document.getElementsByClassName("mySlides"); for (i = 0; i < x.length; i++) { = "none"; } myIndex++; if (myIndex > x.length) {myIndex = 1} x[myIndex-1].style.display = "block"; setTimeout(carousel, 3000); } </script> </body> </html> What am I missing? Thanks!!
  3. The page in question is Here I'm going to have a dozen or so images that I want lined up grid-style. They'll all be sized the same. But, I also want to have the hover overlay that's currently there. CSS is currently: <!-- THUMBNAIL --> <style> .container { position: relative; width: 50% } .image { display: block; margin: 3px; width: 50%; height: auto; } .overlay { position: absolute; top: 0; bottom: 0; left: 3px; right: 0; height: 100%; width: 50%; opacity: 0; transition: .5s ease; background-color: #000000; } .container:hover .overlay { opacity: 1; } .text { color: white; font-size: 20px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); } </style> HTML for each image is: <div class="container"> <a href="../images/thankyounotes/football_equipment.jpg" data-lightbox="kidswehelp" data-title=""><img id="football" src="../images/thankyounotes/football_equipment.jpg" class="image"></a> <div class="overlay"> <div class="text">Testing This</div> </div> </div> Thoughts?
  4. Hello I want to learn to do more stuff like in this Wordpress theme: After the video and the heading with white background there's a section with pictures, whenever you hover over a picture they get dark and some text appear on them. How can i do this? i know i can do something with the :hover pseudo-class and put some style there to get the picture darker, but... how can i make text that wasn't there in the first place appear?
  5. is there a way to use this with i've been working on it for weeks and i cant figure it out i wanna make the content show on hover please help
  6. Hey, When i test this on W3Schoold it seems to work but it isn't working for me in any browser. What i'm trying to do is have a description block pop up when you hover over a link. I've only put in the code for the first link to test it. But it doesn't seem to work for me. Any help? <!DOCTYPE html> <html> <head> <style> a:link {color:blue; background-color:transparent; text-decoration:none} a:visited {color:cyan; background-color:transparent; text-decoration:none} a:hover {color:darkblue; background-color:transparent; text-decoration:underline} a:active {color:yellow; background-color:transparent; text-decoration:underline} h1 { color: blue; font-family: verdana; } .definition em { font-weight: bold; font-style: normal; } p { font-family: verdana; } li { font-family: verdana; } div.tooltip { background-color: yellow; padding: 20px; display: none; } a.appmetadatasync:hover + div{ display: block; } </style> <!-- <link rel="stylesheet" type="text/css" href="theme.css"> --> </head> <body> <H1>Help Index</h1> <ul> <li><a class="appmetadatasync" href="./appmetadatasync/index.htm" target="_blank">App MetaData Sync Utility - Help</a></li> <div class="tooltip"> <p class="definition"><em>App Metadata Sync</em> is a utility that system administrators and developers can use to synchronize metadata from new sources with the metadata that already exists in the system. This new metadata comes from two primary sources:</p> <ul> <li>Application updates or upgrades</li> <li>Add-on (third-party) products</li> </ul> <p>This metadata is of two types:</p> <ul> <li>Metadata associated with IDO collections and related objects such as tables, properties, and methods. This type of metadata also includes property class and custom assembly metadata.</li> <li>Metadata associated with the application event system. For more information about the application event system and its metadata, see the topic Events Overviews and Processes in the online help for your Mongoose application.</li> </ul> <p>Only metadata associated with an Access As identifier is processed using this utility. For more information about the Access As identifier, see the topic for the Access As Field in the online help for your Mongoose application. </p> </div> <li><a id="appmetadatatransport" href="./appmetadatatransport/index.htm" target="_blank">App MetaData Data Transport - Help</a></li> <li><a id="configmanager" href="./configmanager/index.htm" target="_blank">Config Manager - Help</a></li> <li><a id="formcontrol" href="./formcontrol/index.html" target="_blank">Form Control</a></li> <li><a id="formsync" href="./formsync/index.htm" target="_blank">Form Sync</a></li> <li><a id="idoruntimedevserver" href="./idoruntimedevserver/index.htm" target="_blank">IDO Run Time Dev Server</a></li> <li><a id="replicationtool" href="./replicationtool/index.htm" target="_blank">Replication Tool</a></li> <li><a id="serviceconfigmgr" href="./serviceconfigmgr/index.htm" target="_blank">Service Config Manager</a></li> </ul> </body> </html>
  7. I've added hover classes to all of the current color themes.
  8. Hi, The website I am currently working on is this: I have set up the image gallery to be an un-ordered list so that I could achieve the irregular grid. I would love for the images to have a slight dark tint on top of them which goes away when you hover over an image (see example here: but for some reason, whenever I add a hover pseudo-element, I get a black background behind the image (I know this because it is also appearing to the right of the image, which I assume has to do with how I set things up as an un-ordered list - it is reading this space as part of the background). What am I doing wrong?!
  9. There is a rough sample of what's going on at Pay little attention to the code, though. It deliberately violates "best practices" and is less than half done. It simply gives an idea of what the mega-menu structures are intended to do. Also keep in mind, the positions and sizes of the mega-panels are not fixed - and will change from edition to edition (of an online newspaper). The solution, if there is one, must be something that works independent of other features of containers and their styling. It needs to pretty much confine itself to matters of visibility in hovered and toggled states and invisibility at other times. Setup: Its a routine inline-block navbar. there's underlayment containers for certain function and class switches on the list-items themselves for certain functions (on/off/active/dropdown/etc...) nothing special. the anchors are kept relatively clean and have no function except those without submenus - they serve as links - the others just serve as titles for submenus. Straightforward to that point. There are also two primary types of li links - ones that will have dropdown menus of some sort, others that will have mega-menu like panels that use divs as their principle content containers rather than ul/li submenus. Problem: The problem is handling the event actions on the list items. In particular, the gaps or deadspace if one is in hover mode. The mega-panels may be absolutely positioned anywhere on the page. So, when one hovers a navbar link the panels appear, but in traversing to the panel one must pass through unhovered-space (containers that are not associated (often cannot be) with the navbar structure at all. I can get the panels to appear, I can move them around and size them as I wish. I cannot manage to 1) keep them visible when leaving the link to go to them, 2) keep the link hover style active when I leave the list-item. My visibility is controlled with opacity, visibility and overflow and the panels put in block mode when visible (for a variety of reasons I do not wish to use negative margins or display:none properties to handle visibility.)What I've looked at a lot of toggle featured solutions like bootstrap and such. don't want to use them. Other simpler solutions I've seen with jquery, js and css combinations just miss what I'm trying to accomplish. I'm guessing some combination of css and js will do the trick, but I've no js experience. What I'd settle for: To be able to hover from the li to the separate div panels without losing the hover effect on the link or the visibility of the mega-panel. When the pointer is on the panel, both visibilities should remain. Then, when the hover is removed from the panel the panel should become invisible again and the style on the link go back to its unhovered state. What I'd like is: on hover the link styling for hover lights up and the mega-panel appears (stays on as long as the link is hovered. One can then travel to the panel and both elements remain in hover state. if one then clicks either the link or the panel, both are toggled and retain the hovered state visibility. If either are then clicked, then the panel becomes invisible and the link loses its hover styling when the pointer leaves it. I figure the thing takes a combination of js and css classes to put on the event initiators and their targets. If anyone has seen this somewhere or has/can create something like that, my thanks in advance. I haven't found anything like it elsewhere.
  10. Hello, Let's say I have 2 <div>, one wiith id=A and one with id=B I want that, when hovering the mouse cursor to #A, the div #B performs an animation (let's say a transition). Is that possible with CSS? Thanks for reading, tomatoKetchup
  11. Hi Forgive me if this is answered on here. I cant find anything, but that's probably because I don't know the proper terminology to search for. If I explain what I want to do, perhaps a kindly sole might guide me in the right direction. I want to use a (single) picture of me and some buddies. I would like to have the user hover over each person, and have text information displayed while the mouse is within a defined area of the picture. I think I remember, during the stone age, Front page allowed the area to be selected with a mouse. I'm using notepad++ now, so like the wife says "I'm completely without a clue". Many thanks AJ
  12. Hi, I'm new on here, and looking for some help with HTML, CSS code for how to add mouseOver to an Image with mutliple areas on the same image so that when you hover over certain areas on the diagram, it displays text. I have used plugins for this type of thing where you add hotspots to the image which is fine but not what I'm looking for with this particular project. This website has the sort of thing I'm after - see the interactive graphic on the 'Our Process' page - I have very basic understandig of html, and css but I'm learning loads on W3Schools!
  13. Hi everyone, I am making a section of my webpage so that the image links will go from translucent to opaque during a cursor mouseover. However, there is an unintended effect - a little horizontal line (about 1 pixel by 5 pixels) appears at the lower right corner of the image link during the hover. Does anyone know how to make it so the little line does not appear? You can see the effect on - please see the top part of the sidebar, where the social media icon links are. I observed this effect on: Chrome 35.0.1916.114 Safari 7.0.4 (9537.76.4) Firefox 29.0.1 , all using Mac OS X 10.9.3 I have included an excerpt of the code I used below. I put this block of code inside a "HTML Gadget" in Blogger to create this part of the webpage. Thank you very much! Jason <!doctype html> <style> .jwsidebartopbox { /* code */ } .jwsidebartopbox:after { /* code */ } .jwblank1 { /* code */ } .jwsmlinksblock { /* code */ } img.opacify { opacity:0.4; } img.opacify:hover { opacity:1.0; } </style> <div class="jwsidebartopbox"> <div class="jwblank1"> </div> <div class="jwsmlinksblock"> Jason Wang Art is on: <br/> <br/> <a href=""> <img class="opacify" src="" width="30" height="30" alt="facebook"/> </a> <a href=""> <img class="opacify" src="" width="30" height="" alt="youtube" /> </a> <a href=""> <img class="opacify" src="" width="30" alt="google+" /> </a> <br/> /* code */ <br/> /* code */ <br/> </div> </div> </!doctype>
  14. Hey. I am a beginner in html+css, and so far I have been able to solve everything out with google, but this is where it all stopped. I would like to make a solid color background with three icons on it(they are connections). When you hover the first icon, background color changes to yellow. When you hover second one, background color goes to red etc... what is the best solution for this, considering I would like to make a translation soft (meaning from dark gray to yellow in 0.5second, not instantly). Is that achievable with css or is that something where js comes in? The same goes with a text... i would like it to be clickable and change color on hover, again with transition. Just a simple image, but I guess text is clear enough. Thanks.
  15. I am finishing my website but I am still encountering a final problem. The coconut image has a background hover image when the user points the cursor over it, another image appears. Everything works fine, however, when the website is loaded for the first time, there is a fast blink before the hover image is displayed. After that, it works perfectly. How can I fix this issue? Here is the snippet of the code. <script type="text/javascript"> $(document).ready(function() { $('#coconut').hover(function() { $('body').addClass('hover'); }, function(){ $('body').removeClass('hover'); }); }); $(window).scroll(function(event) { $("#nav").css("margin-top", 220-$(document).scrollTop()); }); </script> Please help my website:
  16. Hello, I am very new to CSS and HTML and have been learning since last week, so i hope someone can help me. I have a list, please see the HTML below, I want to make the list item 'Sparkling', sparkle when hovered over. I thought the CSS code below might make it sparkle, but that makes the entire list sparkle on hover - can anyone help me please?! Thank you! HTML<div class="container_12 clearfix"> <div id="header" class="grid_12"> <h1>Lacosta Wines</h1> <div id"nav"> <ul> <li><a href="index.html">Home</a></li> <li><a href="">Red</a></li> <li><a href="">White</a></li> <li><a id="sparkle" href="">Sparking</a></li> <li><a href="">Fine Wines</a></li> <li><a href="">Wine Tastings</a></li> </ul> </div> </div> CSSa:hover, #sparkle {background-image:url('');}
  17. Hello internet. I am having trouble with iPads rendering of my menu bars. I have created a menu bar using .menu class with hover capabilities for a three level menu. It works great except I can’t seem to find out how to hide the second and third level menus within the top level menu for safari. I was able to hide them within the .menu class I created for IE but iPads are showing all three levels of the menu on startup. Please help... This is a sample of how I hid the second level within the top ul ul {visibility:hidden; position:absolute;height:0;top:31px;left:0; width:149px;border-top:1px solid #000;}I defined the menu bar as:<div class="menu"><ul><li>..etc... and closed the menu bar with </li></ul></div>
  18. Greetings, I'm using CSS tags in the head of my pages for changing the opacity of images. I mainly use it for linked images.When I hover over a linked image the opacity changes. I click the link to continue. My problem is with ios devices such as iPads. I understand that hovering on an iPad is not a good design feature and I accept that there is no hover behavior to be expected. But some of my pages do not trigger the links unless I hit the img two times. On most of the pages if I click on a linked img the img blinks quickly (quick hover behavior) and then triggers. On some of the pages I hit the img and it blinks but does not trigger the link. If I hit it again it continues to the link. One important thing that I've discovered is that the pages that work correctly are at the top level of the site. The ones that have the odd behavior are nested inside a sub table and iframe. The hover code is exactly the same on all pages: Does anyone know why this might happen? I'm also interested to know if there's a better way of handling the img opacity on mouse-over that I'm trying to achieve? inline code? so only certain images are affected. Thanks in advanceck
  19. HelloI am a newbie to CSS. I am trying to create a block colour hover when a mouse hovers a whole image. So the image appears normal, then changes to a transparent shade of black over the whole image when hovered over. At the moment it goes white and looks too faded. I still want the image to show under the black - just transparent with some white text on. Can anyone please advise me? This is what I put in my stylesheet: a:hover img {filter:alpha(opacity=50);-moz-opacity:0.5;-khtml-opacity: 0.5;opacity: 0.5;} This is what I have at the moment: Thanks
  20. I've been messing around with the map and area elements (for the first time) to build a navigation bar with images, and I've run into a couple problems. The first problem is the images used in the navigation bar aren't aligning in firefox how I think I set them to align. Here is capture, from firefox, showing what I mean: However, they align exactly how I want them to align in all the other major browsers. For instance, here is capture from chrome: The code in question is the cell with the id of navigation. Additionally I would like to be able to create a hover state, and an active state for these images used in the navigation bar. This is the second problem I've been having. I don't know if it's even possible to use CSS on images to create a hover state for a link. If it is, I'm surely doing something wrong, based on the things I've tried. I'd like to be able to change the image when hovered over, and at the very least I'd like to be able to underline the image on hover. I checked around to see what I could find, but I didn't find anything that I perceived as an answer to my problems. Any help would be greatly appreciated. This is my HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""><html xmlns=""><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Sarasota-Tampa Express Homepage</title><link href="all.css" rel="stylesheet" type="text/css" /></head><body id="theHeader" ><table id="headerTable" border="0" cellspacing="0" cellpadding="0"> <tr> <td id="logoBox"> <img src="images/Sarasota-Tampa-Express-Logo.png" width="205" height="75" alt="Logo" /></td> <td> <table id="rightsideHeader" border="0" cellspacing="0" cellpadding="0"> <tr> <td><p id="tagLine">We make things convenient for you! <span id="phoneNumber">Call Today! (941)366-6600</span></p> </td> </tr> <tr> <td align="left" valign="top" id="navigation"><img src="images/home.png" usemap ="#home" id="home"/><map name="home"><area shape="poly" coords="-3,0,74,0,74,8,79,16,74,24,74,33,-3,33" href="index.html" alt="Home"/></map><img src="images/about-us.png" id="aboutUs" usemap ="#aboutUs"/><map name="aboutUs"><area shape="poly" coords="0,0,105,0,105,8,110,16,105,24,105,33,0,33,0,24,5,16,0,8" href="index.html" alt="About us"/></map><img src="images/route-and-schedule.png" id="routeAndSchedule" usemap="#routeAndSchedule"/><map name="routeAndSchedule"><area shape="poly" coords="0,0,173,0,173,8,178,16,173,24,173,33,0,33,0,24,5,16,0,8" href="index.html" alt="Route And Schedule"/></map><img src="images/flight-information.png" id="flightInfo" usemap="#flightInfo"/><map name="flightInfo"><area shape="poly" coords="0,0,179,0,179,8,184,16,179,24,179,33,0,33,0,24,5,16,0,8" href="index.html" alt=" Flight Information"/></map><img src="images/fare.png" id="fare" usemap="fare"/><map name="fare"><area shape="poly" coords="0,0,70,0,70,33,0,33,0,24,5,16,0,8" href="index.html" alt="Fare"/></map></td> </tr> </table> </td> </tr></table><table id="mainTable" align="center"> <tr> <td> </td> </tr> </table> </body></html> This is my CSS: @charset "utf-8";.body {font-family: Verdana, Geneva, sans-serif;}.table {margin: 0px;padding: 0px;}.td {margin: 0px;padding: 0px;}/*==== header ====*/#theHeader {background-repeat: repeat-x;background-image: url(images/header-gradient.png);margin: 0px;}#headerTable {height: 150px;width: 1024px;margin-left: auto;margin-right: auto;/*==== leftside header ====*/}#logoBox {width: 268px;padding-left: 50px;}/*==== rightside header ====*/#rightsideHeader {height: 150px;}#tagLine {font-family: Verdana, Geneva, sans-serif;font-size: 16px;font-style: italic;text-align: left;color: #FFF;padding-top: 12px;}#phoneNumber {padding-left: 80px;} #navigation {height: 67px;width: 700px;padding-left: 0px;}img {border-top-style: none;border-right-style: none;border-bottom-style: none;border-left-style: none;text-decoration: none;}#navbar {padding: 0px;height: 34px;width: 605px;}#home { } /*==== main content ====*/#mainTable {background-image: url(images/background-gradients.png);height: 618px;width: 1024px;}#aboutUs {position: relative;right: 5px;}#routeAndSchedule {position: relative;right: 10px;}#flightInfo {position: relative;right: 15px;}#fare {position: relative;right: 20px;}
  21. how do i size a link so when the mouse rolls over it creates a background column for the length of the page? Tried: <li><a href>1399 </a></li> a:hover{background-color:yellow;background-height: auto;} also tried w/a px value but not use. Saw the effect on a website & wanted to try & recreate it. ( Nope can't find the link I used or i'd ckeck the page source )thank you
  22. Hey guys! Btw, great new look Okay, I have a problem that I fear cannot be resolved.I would simply like confirmation of this. My site makes use of jQuery and the LavaLamp effet for the menu.You can check it out here. My problem is this: the portfolio section is basically a jQuery slideshow, with fading transitions and such.We're still good. The problem comes when I add an animation the the background image.The slideshow becomes choppy whenever the user moves his mouse. Am I coding in a non-efficent way?Or is this just a normal jQuery limitation? Thanks.