RockyŠ Posted August 31, 2010 Share Posted August 31, 2010 Hello, I'm often here on w3schools but never made it to the forums, because I didn't know that exists I have problem with css, what I'm trying to do is align background image (it is used for hoover) with those at the menu and I can't get it to work, it always stays on the right side not on center. Here's the link to html http://www.z-com.si/rok/Orhideja/index.htmlcsshttp://www.z-com.si/rok/Orhideja/style.css Link to comment Share on other sites More sharing options...
dsonesuk Posted August 31, 2010 Share Posted August 31, 2010 remove background from #menu a{}, and add it to #menu a:hover, then change width in hover to 105px; postion image 7px from left, and you are good to go.#menu a:hover {background:transparent url(images/menuhover.gif) no-repeat scroll 7px top;width:105px;} Link to comment Share on other sites More sharing options...
RockyŠ Posted September 1, 2010 Author Share Posted September 1, 2010 Thank you for reply but there is still small problem,All images aren't aligned, there is no hover effect on "About us".There is hover effect before the "Home" button but there is no button :)Sorry, server is down and files are unavailable at the moment. Link to comment Share on other sites More sharing options...
dsonesuk Posted September 1, 2010 Share Posted September 1, 2010 the first image before "home" is produced because you have a anchor link for "Domor" there, is this for "home"? can't access page to find out. If this is, use margin-left: to make them line up below image of buttons.probably would have been a better option to use ordinary background image with no text in anchor, and use text of anchor instead, then swap image for shadow image on hover. then you wouldn't need to change background image everytime you make amendment, and reposition the buttons where you like. Link to comment Share on other sites More sharing options...
RockyŠ Posted September 1, 2010 Author Share Posted September 1, 2010 Thanks again, margin-left: worked like a charm. Link to comment Share on other sites More sharing options...
RockyŠ Posted September 1, 2010 Author Share Posted September 1, 2010 When I thought everything is OK I've uploaded new files and now look what happens... http://www.z-com.si/rok/Orhideja/index.html http://www.z-com.si/rok/Orhideja/style.css Link to comment Share on other sites More sharing options...
dsonesuk Posted September 1, 2010 Share Posted September 1, 2010 you are adding margin to each menu anchor.remove margin from here #menu a:hover {background:transparent url(images/menuhover.gif) no-repeat scroll 7px top;/*margin-left:99px;*/width:105px;}add it to here#menu ul {margin:0 0 0 99px;padding:0;} Link to comment Share on other sites More sharing options...
RockyŠ Posted September 5, 2010 Author Share Posted September 5, 2010 Ok I have another problem with aligning content... I hope you could help me. www.z-com.si/rok/Etna/galerija.php as you can see sidebar is in the wrong place, it should be aligned with the gallery. css file can be found herewww.z-com.si/rok/Etna/default.css Link to comment Share on other sites More sharing options...
dsonesuk Posted September 5, 2010 Share Posted September 5, 2010 #wrapper {/* added by dsonesuk*/margin:0 auto;width:940px;}.content {color:#CCCCCC;font-family:arial,sans-serif;font-size:14px;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:normal;line-height:1.4; /*what unit value should this be ??? em*/margin:20px auto;/* added by dsonesuk*/float:left;} Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.