Click to See Complete Forum and Search --> : setting hspace in style sheet


d3dtn01
11-25-2003, 12:56 PM
I'd like to set the hspacing for all my images in my style sheet. I tried the following:

img { hspace: 20}

But this appears to do nothing. Also tried just making it a propery of BODY:

body { hspace: 20}

Which didn't work either.

Any suggestions?

I'm new to html, so I hope this isn't an overly simple question.

pyro
11-25-2003, 01:30 PM
hspace has been depreciated in HTML and never was a part of CSS. You are going to want to use the margin (http://www.w3.org/TR/REC-CSS2/box.html#margin-properties).

img {
margin: 0 10px 0 10px; /*Specified: top right bottom left*/
}

d3dtn01
12-10-2003, 01:05 PM
Originally I used "margin" in my style sheet, as specified above, and it worked great in IE. But I just checked my site our in Netscape (4.79) and the text was not wrapping (it spread across entire page and the image was pasted on top). When I removed "margin" from my style sheet, it wrapped, but of course I lost my image margins. Any suggestions how to get it to work in both IE and Netscape?

pyro
12-10-2003, 01:07 PM
Very little CSS works in NN 4...