Jump to content

hspace: transform to css


calvin kan

Recommended Posts

hello all :) i m not new to w3schools but i m new to this forumas the attribute hspace of img tag is deprecated, styles is suggested to use instead.http://www.w3schools.com/tags/tag_img.aspi tried the following values in my style sheet for img but none of them can act like the effect of hspace:margin; word-spacing; white-space; padding; and border-spacing; pls advise which value(s) the official counterpart of hspace in css isthanks a lot

Link to comment
Share on other sites

I think it is margin. Something like this:

img {   margin: 0 5px;}

Which adds 5 empty pixels to each side of the image.Padding normally could be used also, which enlarges the width of the image in the browser, whithout actually enlarging the image's content (so the only difference is that you have a wider space to click if your image is a link, same for right clicking to see the image properties).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...