CSS - Images Jumping On Mouseover
I'm trying to use the CSS hover state that I found on CSS Ninja, but for some reason when I hover over the images, they keep bumping upward. I've gone line by line trying to figure out which one it is, and I think it's the position:absolute line under a.feature01 .overlay01 .caption01; however, I can't get it to stop doing it even if I change the position to relative, fixed, etc. I ran it through the CSS validator as well and got no errors.
Here is the CSS code Code: a.feature01 { display: block; position: relative; } a.feature01:hover .overlay01 { position: absolute; width: 185px; height: 130px; } a.feature01 .overlay01 .caption01 { position: absolute; height: 30px; line-height: 30px; width: 100%; text-indent: -9999em; color: #000; font-size: 11px; bottom: 0; overflow: hidden; } a.feature01:hover .caption01 { text-indent: 10px; background: rgb(255,255,255); /* for browsers that know rgba */ background: rgba(255, 255, 255, 0.75); } Similar TutorialsHave a look at this menu: http://elliottback.com/wp/wp-conten...e-x/googlex.htm Is it possible to achieve that effect using a navbar (marked up as a list), and using CSS rather than javascript? Please provide examples / links. Sup /css/. Here is the temporary build of my page. The links are dead on purpose: http://www.mindwallpictures.com/files/temp/mediachef If you click on "services" you'll see a drop down list appear. I have mouseovers on these links which make an image appear toward the top of the page. "web&graphic, film&video, etc..." However, the links for 'portfolio', 'about us' and 'contact us' should also have this same mouseover effect. But they do not work. I believe this is a problem with my css and not the javascript, because when I swap out a mouseover command of one of the non-working links for one of the working links, the image will appear. It seems to not want to toggle those particular divs. Here is the javascript code: Code: <script language="Javascript" type=""> <!-- function toggleDiv(id,flagit) { if (flagit=="1"){ if (document.layers) document.layers[''+id+''].visibility = "show" else if (document.all) document.all[''+id+''].style.visibility = "visible" else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible" } else if (flagit=="0"){ if (document.layers) document.layers[''+id+''].visibility = "hide" else if (document.all) document.all[''+id+''].style.visibility = "hidden" else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden" } } //--> </script> The related css: Code: #webgraphic {position:absolute; top:25px; left:179px; width:58px; height:382px; visibility:hidden; background:url(images/webgraphic.gif);} #filmvideo {position:absolute; top:25px; left:179px; width:58px; height:382px; visibility:hidden; background:url(images/filmvideo.gif);} #musicaudio {position:absolute; top:25px; left:179px; width:58px; height:382px; visibility:hidden; background:url(images/musicaudio.gif);} #photography {position:absolute; top:25px; left:179px; width:58px; height:382px; visibility:hidden; background:url(images/photography.gif);} #portfolio {position:absolute; top:25px; left:179px; width:58px; height:382px; visibility:hidden; background:url(images/portfolio.gif);} #about {position:absolute; top:25px; left:179px; width:58px; height:382px; visibility:hidden; background:url(images/about.gif);} #contact {position:absolute; top:25px; left:179px; width:58px; height:382px; visibility:hidden; background:url(images/contact.gif);} and the xhtml: Code: <div class="sidemenu"> <div id="links"> <div><a href="/">home</a></div> <a href="javascript:animatedcollapse.toggle('services')">services</a></div> <div id="services"> <a href="#" onmouseover="toggleDiv('webgraphic',1)" onmouseout="toggleDiv('webgraphic',0)">web & graphic</a><br /> <a href="#" onmouseover="toggleDiv('filmvideo',1)" onmouseout="toggleDiv('filmvideo',0)">film & video</a><br /> <a href="#" onmouseover="toggleDiv('musicaudio',1)" onmouseout="toggleDiv('musicaudio',0)">music & audio</a><br /> <a href="#" onmouseover="toggleDiv('photography',1)" onmouseout="toggleDiv('photography',0)">photography</a> </div> <div id="links"> <div><a href="#" onmouseover="toggleDiv('portfolio',1)" onmouseout="toggleDiv('portfolio',0)">portfolio</a></div> <div><a href="#" onmouseover="toggleDiv('about',1)" onmouseout="toggleDiv('about',0)">about us</a></div> <div><a href="#" onmouseover="toggleDiv('contact',1)" onmouseout="toggleDiv('contact',0)">contact us</a></div> </div> </div> It acts as if it's a problem with syntax, but I don't see any errors and my code is validated. Any help would be greatly appreciated. Thanks. http://www.kafadrian.com/juggernaut/index.html is what i have so far I want it to look like: http://www.kafadrian.com/juggernaut/layout.jpg The problem im having is that the image links that have mouseover effects dont align (touch) the blue bar below them and apparently in some browsers the image links themselves have gaps between them I spent hours, and yes im relatively noobish about all this, trying all sorts of different display commands and border/margin commands to try and get rid of any spaces, the way the site is now (10.01.08) is the best i could get it. in IE7 the mouseover images connect horizontally but not vertically with other images. am i going about this all wrong? my experience in building websites is mostly from the early eras of netscape when IE was new, back when you put stuff in a table a certain way with no cellpadding/spacing/border and everything aligned no problem. I appreciate any help with this as I undertand it will take time to give me an answer that no only makes sense (to me) but will work. the code for the site is: 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=utf-8" /> <title>Juggernaut - Monolith - Order</title> </head> <body marginheight="0" marginwidth="0" leftmargin="0" rightmargin="0" topmargin="0"> <script type="text/javascript"> <!-- var image1 = new Image(); image1.src = "news1.jpg"; var image2 = new Image(); image2.src = "news2.jpg"; var image3 = new Image(); image3.src = "news3.jpg"; var image4 = new Image(); image4.src = "roster1.jpg"; var image5 = new Image(); image5.src = "roster2.jpg"; var image6 = new Image(); image6.src = "roster3.jpg"; var image7 = new Image(); image7.src = "forums1.jpg"; var image8 = new Image(); image8.src = "forums2.jpg"; var image9 = new Image(); image9.src = "forums3.jpg"; var image10 = new Image(); image10.src = "files1.jpg"; var image11 = new Image(); image11.src = "files2.jpg"; var image12 = new Image(); image12.src = "files3.jpg"; var image13 = new Image(); image13.src = "info1.jpg"; var image14 = new Image(); image14.src = "info2.jpg"; var image15 = new Image(); image15.src = "info3.jpg"; var image16 = new Image(); image16.src = "founded.jpg"; //--> </script> <script type="text/javascript"> <!-- function roll(img_name1, img_src1, img_name2, img_src2) { document[img_name1].src = img_src1; document[img_name2].src = img_src2; } //--> </script> <table border="0" cellspacing="0" cellpadding="0" style="margin:0"> <tr height="34"> <td rowspan="4"> <img style="display:block" src="juggernaut.jpg" width="560" height="110"/> </td> <td> </td> </tr> <tr> <td> <a href="index.html" style="display:inline-block" onmouseover="roll('news','news2.jpg','text','news3.jpg')" onmouseout="roll('news','news1.jpg','text','founded.jpg')"> <img style="display:inline-block" src="news1.jpg" name="news" width="48" height="48" border="0"/> </a> <a href="index.html" style="display:inline-block" onmouseover="roll('roster','roster2.jpg','text','roster3.jpg')" onmouseout="roll('roster','roster1.jpg','text','founded.jpg')"> <img style="display:inline-block" src="roster1.jpg" name="roster" width="48" height="48" border="0"/> </a> <a href="index.html" style="display:inline-block" onmouseover="roll('forums','forums2.jpg','text','forums3.jpg')" onmouseout="roll('forums','forums1.jpg','text','founded.jpg')"> <img style="display:inline-block" src="forums1.jpg" name="forums" width="48" height="48" border="0"/> </a> <a href="index.html" style="display:inline-block" onmouseover="roll('files','files2.jpg','text','files3.jpg')" onmouseout="roll('files','files1.jpg', 'text','founded.jpg')"> <img style="display:inline-block" src="files1.jpg" name="files" width="48" height="48" border="0"/> </a> <a href="index.html" style="display:inline-block" onmouseover="roll('info','info2.jpg','text','info3.jpg')" onmouseout="roll('info','info1.jpg','text','founded.jpg')"> <img style="display:inline-block" src="info1.jpg" name="info" width="48" height="48" border="0"/> </a> </td> </tr> <tr> <td> <img style="display:block" src="line_right.jpg" width="240" height="4"/> </td> </tr> <tr> <td> <img style="display:block" src="founded.jpg" align="right" name="text" width="144" height="20"/> </td> </tr> </table> </body> </html> Hello everyone, I'm tearing my hair out on this one. Here is the problem If you view this in IE 6, sometimes the footer will jump up towards the top. If you activate any :hover things, it will jump back down to where it's supposed to be and stay there. EDIT: Actually, it's just the first element in the footer div. If I seperate the lines into paragraphs, only the top paragraph will jump. Isn't that even stranger? Each profile is wrapped in a div, clear: both no floats. The profile pictures are floated left, inside the div. It only happens on this page, and not any of the others. I can't figure out why. Has anyone seen this before? I've tried all the holly hacks and clear fixes I could try. css Code: Original - css Code div.profile { clear: both; height: 1%; margin: 15px 0px; padding: 0px; } img.profile { float: left; margin: 5px 20px 5px 20px; border: 1px solid #333; vertical-align: top; }
Does anyone know why on this page the footer suddenly appears at the bottom and not attached to the centre area?: My website works perfectly on IE, but not in IE. The page loads fine in Firefox, but after a few seconds, the page jumps and the header cuts in half and almost hides behind my toolbar. I'm sorta new to CSS-positioning so some of the code looks jumbly. But I'm trying to make the page work in mozilla's firefox and in the process of doing that I broke it in IE. Anyways, here is the link to the buggy page that the div containers hop all over the place. If you hit refreash enough you will see the lower section that displays the extra news articles will lose its left-margin setting and hop around. Plus it drops the archive container down below the extended news section as if they widths are clashing when they appear fine in firefox. I'm assuming there is probably some type of ie bug and I'm curious if someone has a link to a hack for it? Could use any help Hi, I have been battling with this issue for a while now and need the community's help here. I am not the sole developer on this project and it's kind of difficult to work through other people's code - plus, I'm a developer, not a designer. Anyow. Have a look at this page: Article on Jakarta Globe Site I implemented the drop down for the 'share article' feature. I'm using scriptaculous and costum-built JS to achive the effect. It's all good in IE - but you can see that in FF, the bread crumbs jump to the right when the drop down is activated. I have tried to implement a 'clearit' div like this: CF Code: Code: <div class="article-body"> <div id="clearit"></div> CSS: Code: #clearit { display: block; clear:both; } With the effect, that in FF, the whole article jumps down a few pixels when the drop down is activated. (The bread crumbs don't jump to the right anymore. I'm at loss now. Here's the CSS code for the relavant div's: Code: #article-heading { border-top:solid 4px black; background:url(../images/objects/module-head-bg.gif) repeat-x top; height:26px; } .article-heading span { display:block; float:left; padding:5px 15px 5px 10px; height:16px; } #slidedown_share { position:relative; width:123px; height:137px; background:#f4f2e6; border-left: solid #000 1px; border-right: solid #000 1px; border-bottom: solid #000 1px; text-align:left; left:510px; } .article-body { border-left:solid 1px black; border-right:solid 1px black; border-bottom:solid 1px black; background-color:white; padding:10px; margin-bottom:8px; font-size:11px; } Does anybody have an idea why this is happening and how I can avoid it? Thank you for your help Adrian Hello, I have made playersnutrition.com As you can see, when you go to another page, the menu dosent stay at the top. How do I make it stay at the top???? If you see on http://promogift.be/index.php?page=producten the first 4 products are like it must be, but from 5 and more it makes a different jump, i don't get it why, IE show it good... I searching for 2 days now and don't get it, anyone a solution? Hi, If I have Code: #parent { background-color: red; padding: 2px; margin: 2px; } #child1 { float: left; } #child2 { float: left; } </style> <div id="parent"> <div id="child1"> Some text </div> <div id="child2"> Some text 2 </div> </div> Then the two child divs will appear underneath the parent one, whereas I want the background from the parent one to be the backdrop for the two child divs. if I remove float: left then they appear in it, but underneath each other. I want them side by side. Is this possible with css? We've got something odd happening on our site. Check out: newser.com/story/82843/conan-obriens-twitter-woman-shows-class.html If you leave your browser window alone for about 5 minutes, eventually the content on the page jumps down. If you scroll, or mouseover the window, it jumps back. Any ideas on the issue? One thing to note -- we're watch for breaking news periodically -- when something big happens, we load a banner above the nav via AJAX. Seems like this may be a factor even though it's usually empty. I am trying to teach myself doing a tableless website using css and I am starting with header then working my way down I spent all day trying to serach a way to stop the right end image cap to jump down the next row when firefox width browser is shrinked down but it doesn't do that in IE .. Here the url http://www.prismaze.com/ it showing only the header right now and it what I am having issue with .. there are 3 images in it .. left and right and the background .. Here the html and css <body> <div id="logoheader"> <img src="templates/stlaware/images/stlaware_01.png" width="548" height="90" border="0" align="left" /> <img src="templates/stlaware/images/stlaware_05.png" width="55" height="90" border="0" align="right" /> </div> </body> </html> ------------------------ the css ------------------------ body { margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; background-color : #FFFFFF ; } #logoheader { background: url(../images/stlaware_03.png) repeat; height: 90px; width: 100%; } How do you stop image on the right side of the header (stlaware_05.png) from wrapping to the next row if Firefox browser is sized down in width? Thanks .. Bill Please go to this page - http://www.pacunionsonoma.com/real-estate-agent.asp?realtor=51 On the top right click on Active Listings Then watch the top agent image, title, and intro text. It is out of place BUT only until the page finishes loading, then it "jumps" in place... Im new to CSS... i have created a nested set of <div> tags, the outer one is an image and the second one has a white background with an opacity set to it so you can see the image behind it, and the box has some text inside... i want to have a mouseover event that makes that second div invisible (so that the whole photo behind it will show). Either a mouseover or a mouseclick event...i would prefer a mouseclick, but i need one or the other i dont want to end up doing it in photoshop with rollover images...its so much prettier in CSS! -Thank You I have several small images in a row. Mouseover on each changes them to different image. However, trying to achieve paragraph of text to appear below this row - differerent <div> of text depending on which image is hovered over. My trial so far uses code below. (a) am I correct in saying I can achieve what I want with only CSS? (b) I know it's got something to do with hiding and showing a block?!? Suggestions appreciated. Thanks. <style type="text/css"> div.image1 { background: url(image1.jpg) no-repeat top left; width: 100px; height: 100px; } div.image1:hover { background: url(image1_hover.jpg) no-repeat top left; width: 100px; height: 100px; } </style> <div class="image1"> </div> Hi I'm kinda new to this forum, so i'll just hope im in the right place to post my problems.. I'm from the Netherlands, so i dont know if my English is always correct.. I'll try to make it as best as i can.. ok.. that was the short intro.. now the problem: ok.. i have made the following page, using some css from a website. Code: <html> <head> <title>lol</title> </head> <style media="screen" type="text/css"> /* NAVIGATION BUTTONS */ .cssnav { position:relative; font-family: arial, helvetica, sans-serif; background-image: url(overbtn2.jpg); background-repeat: no-repeat; white-space: nowrap; display: block; width: 211px; height: 44px; margin: 0; padding: 0; } .cssnav a { display: block; color: #000000; font-size: 11px; width: 211px; height: 44px; display: block; float: right; color: black; text-decoration: none; } .cssnav img {width: 211px; height: 44px; border: 0; } * html a:hover {visibility:visible} .cssnav a:hover img{visibility:hidden} .cssnav span { position: absolute; left: 30px; top: 15px; margin: 0px; padding: 0px; cursor: pointer; width: 149px; height: 14px; text-align: center; } /* END OF NAVIGATION */ </style> <body bgcolor="#000000"> <!--MAIN NAVIGATION START--> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="downbtn2.jpg" alt="home" /><span>home</span></a></div> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="downbtn2.jpg" alt="home" /><span>home</span></a></div> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="downbtn2.jpg" alt="home" /><span>home</span></a></div> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="downbtn2.jpg" alt="home" /><span>home</span></a></div> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="downbtn2.jpg" alt="home" /><span>home</span></a></div> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="downbtn2.jpg" alt="home" /><span>home</span></a></div> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="downbtn2.jpg" alt="home" /><span>home</span></a></div> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="downbtn2.jpg" alt="home" /><span>home</span></a></div> <!--MAIN NAVIGATION END--> </body> </html> this was a test page for a menu i am currently making. I also wanted to make a link that works quite like this, only without the text in the buttons. Currently the idea is like.. i made a nice pic in paint of a closed book, and on a mouseover.. the other pic i made, an opened book, should appear.. but it doesnt the source is now like this Code: <html> <head> </head> <style media="screen" type="text/css"> /* NAVIGATION BUTTONS */ .cssnav { position:relative; background-image: url(open.bmp); background-repeat: no-repeat; white-space: nowrap; display: block; margin: 0; padding: 0; } .cssnav a { display: block; display: block; float: right; color: black; } .cssnav img {border: 0} * html a:hover {visibility:visible} .cssnav a:hover img{visibility:hidden} } /* END OF NAVIGATION */ </style> <body bgcolor="#000000"> <!--MAIN NAVIGATION START--> <div class="cssnav"><a href="onder.html" target="onder" title="home"><img src="dicht.bmp" alt="home" /><span>home</span></a></div> <!--MAIN NAVIGATION END--> </body> </html> can anyone please tell me how i can solve this problem? thanks in advance.. -Emiel- I've been trying to combine an image link with a mouse over cursor I made. I was created an image that led to another URL. I wanted to have a mouse over cursor appear when you put your cursor over it so it could show the extra cursor image with it(I hope that made sense). This is what I've done so far(The smile image in the code below isn't the real image I'm going to use. I'm just using it as an example in this case): ----- Code: <html> <head> <style type="text/css"> .smile { cursor:url(http://www.quackit.com/pix/smile.gif),auto } </style> </head> <body> <h3 class="smile">"<a href="http://www.4m4life.com"> <img src="http://i107.photobucket.com/albums/m305/Red_psn/newsigggg2.jpg" width="530" height="126" alt="banner" border="0" /> </a>"</h3> </body> --- So, what I end up getting is the image link working correctly, but the mouse over cursor won't appear the way it should, it only displays the pointer on it because it's a link? Is there a way to disable the pointer in the code I gave so the mouse over image will appear instead? It seems like the mouse over image(the smile which I added for an example) will only appear in the quotation marks no nowhere else on the image link... I usually don't ever ask for help, but since I'm VERY new to HTML and CSS, I will now please ask for some help. X-D Anyway, help would be much appreciated -Red |