calvin kan Posted October 21, 2005 Share Posted October 21, 2005 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 More sharing options...
F-Man Posted October 21, 2005 Share Posted October 21, 2005 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 More sharing options...
calvin kan Posted October 21, 2005 Author Share Posted October 21, 2005 thanks F-Manyou set a good base for my further questionmy problem is, even i set the img like this: img { margin: 0 0px;} there is still a little space between (two) imgspls advisethanks Link to comment Share on other sites More sharing options...
F-Man Posted October 21, 2005 Share Posted October 21, 2005 Maybe because you put a space between them? Remember img is inline, so it is considered like text. Images usually have no margin by defaut so <img/><img/> should look like what you want. Link to comment Share on other sites More sharing options...
calvin kan Posted October 21, 2005 Author Share Posted October 21, 2005 thanks F-Manproblem solvedsorry for my poor html grammar Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now