CSS Q
- Started
- Last post
- 7 Responses
- SF
I'm using background colours to get a rollover effect on some .gif buttons. The problem is, in opera the background colour spills our about 3 pixels above and below the image.
Anyone know how to prevent this happening?
- unformatted0
margin:0px;
padding:0px;maybe?
- SF0
Thanks, but that was the first thing i tried. doesn't work. The buttons look and work fine in all other browsers though, it's just opera. If it didn't give such an ugly effect, i'd let it slide.
- gabriel_pc0
Have you tried setting the image to:
display: block;
float: left;?
Sometimes that'll fix gaps around images. Let me know if that works for you.
- pixelherder0
Sometimes an align attribute in an image tag will create duff space. Control the position of the image with CSS, take out the align attribut and make sure border is set at 0, other than that the problem may well be with other elements, maybe table cells below or above with content causing it to spill?
- SF0
Hi, I've pushed it up to a geocities location so you can have a look if you want.
http://www.geocities.com/theinqu…
open it in opera 6 or 7 and look at the buttons on the right. The purple background is just to illustrate the surrounding div.
Anyone seen that problem before?
- SF0
Ok, Opera 6 will display the above described problem. Opera 7 seems to have a problem with geocities.
- SF0
no-one up for the challenge?