1 reply [Last post]
mikeym
Offline
newbie
Last seen: 15 years 6 days ago
Joined: 2007-01-24
Posts: 1
Points: 0

Hi,

I'm quite new to CSS and I'm trying to make a rollover image that is centered inside a div block on my page. I have coppied an example of the forum that works for the rollover (on safari & firefox anyway) but I can't center it because it is a block element.

Here is the code

HTML


 

Mad Mell




CSS

#madmell { text-align: center; }
#madmell a { display: block; background : url(moviepics/MellGibson.png); width:100px; height:139px; padding:0; margin:0;}
#madmell a:hover { background : url(moviepics/MellGibson2.png);}

vinhboy
vinhboy's picture
Offline
Enthusiast
davis, ca
Last seen: 13 years 19 weeks ago
davis, ca
Joined: 2006-12-21
Posts: 257
Points: 0

Why isnt your html like

Why isnt your html like this:

Mad Mell