...

View Full Version : Spacing between images using css



lixiao
07-30-2012, 12:01 PM
Dear all,

I wanted to keep vspace=30px and hspace=20px between the images. Instead of using the deprecated vspace and hspace tags in html, I have added a line (shown in red) in the css stylesheet:

.ImgBorder:hover { border: 1px solid red;
margin: 30px 20px; }


But, the result is that only the horizontal spacing (20px) is shown between the images, the vertical spacing (30px) isn't shown between the images. What's wrong with my css coding?

The resulting page is here: http://www.lixiao-art.com/bliss.html

The entire css coding is here:

------------

body { font-family: Verdana;
color: white;
margin: 0px;
background-color: black; }
#header { font-family: courier new;
padding-left: 40px;
padding-top: 5px;
padding-bottom: 5px;
border: none;
background-color: white;
margin-bottom: 0px; }
#content {float: left;
padding: 30px 20px 20px 100px;
width: 650px;
margin: 0px;
border: none;
font: white;
font-family: Arial;
background-color: black; }
h2 {height: 2em;}
#nav {float: left;
text-align: right;
font-size: small;
width: 200px;
margin-top: 30px;
font-weight: bold;
padding: 10px;
border: none;
}
#footer { font-family: arial;
padding-bottom: 5px;
width: 100%
border: none;
background-color: black;
color: white;
margin-bottom: 0px; }
a{text-decoration: none;
color: white;}
a:hover {color: red;}



* {margin: 0;}
html, body {height: 100%;}

.wrapper {min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -1.5em;}

.footer, .push { height: 1.5em; }

.ImgBorder:hover { border: 1px solid red;
margin: 30px 20px; }

img { border: none; }

---------------------------

Many thanks !!

SB65
07-30-2012, 12:02 PM
See my reply to your other thread...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum