setting hspace in style sheet

admin

Administrator
Staff member
I'd like to set the hspacing for all my images in my style sheet. I tried the following:<br />
<br />
img { hspace: 20}<br />
<br />
But this appears to do nothing. Also tried just making it a propery of BODY:<br />
<br />
body { hspace: 20}<br />
<br />
Which didn't work either.<br />
<br />
Any suggestions?<br />
<br />
I'm new to html, so I hope this isn't an overly simple question.<!--content-->hspace has been depreciated in HTML and never was a part of CSS. You are going to want to use the margin (<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/box.html#margin-properties">http://www.w3.org/TR/REC-CSS2/box.html# ... properties</a><!-- m -->).<br />
<br />
img { <br />
margin: 0 10px 0 10px; /*Specified: top right bottom left*/<br />
}<!--content-->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?<!--content-->Very little CSS works in NN 4...<!--content-->
 
Back
Top