Center rollover images
-
It is probably a very unintelligent question, but I can’t figure it out…
I have three rollover images on my homepage, which I want to center horizontally, and I want to add some white space in between them. The current page is like this: http://www.jansweijer.nl, and I want it to be something like this: http://www.jansweijer.nl/home (but then with 3 images)
The code I’m using in CSS is now this:
/* ///////////////////////////////////////////////////////////////////// // Menu rollover images /////////////////////////////////////////////////////////////////////*/ /**** Industrial Design ****/ .rolloverIDbutton a { display: block; width: 165px; height: 165px; background: url('http://www.jansweijer.nl/wp-content/uploads/2012/09/IDbutton.jpg') no-repeat; text-decoration: none; float: left; } .rolloverIDbutton a:hover { background-position: -165px 0; } /**** Graphic Design ****/ .rolloverGDbutton a { display: block; width: 165px; height: 165px; background: url('http://www.jansweijer.nl/wp-content/uploads/2012/09/GDbutton.jpg') no-repeat; text-decoration: none; float: left; } .rolloverGDbutton a:hover { background-position: -165px 0; } /**** Photography ****/ .rolloverPHbutton a { display: block; width: 165px; height: 165px; background: url('http://www.jansweijer.nl/wp-content/uploads/2012/09/PHbutton.jpg') no-repeat; text-decoration: none; float: left; } .rolloverPHbutton a:hover { background-position: -165px 0; }And on my page I’m using this:
<div class="rolloverIDbutton"><a href="http://www.jansweijer.nl/industrial-design"> </a></div> <div class="rolloverGDbutton"><a href="http://www.jansweijer.nl/industrial-design"> </a></div> <div class="rolloverPHbutton"><a href="http://www.jansweijer.nl/industrial-design"> </a></div>Thanks in advance!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Center rollover images’ is closed to new replies.