Thread: CSS Questions

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Posts
    5
    Rep Power
    0

    Question CSS Questions


    I am trying to use CSS to create a white space around an image. Is there a particular tag or attribute to get this done? If not what are the other solutions? I know I can use the hspace within each img element, but I would rather be able to change each image globally buy using CSS.

    Thanks in advance,
    Sean
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    la, ca
    Posts
    84
    Rep Power
    14
    You can do something like:

    img {margin: 25px;}

    This'll add a 25px margin around all sides of the image. If you only want the space on certain sides, use margin-top, margin-bottom, margin-right or margin-left.

    http://www.w3.org/TR/REC-CSS1#margin

IMN logo majestic logo threadwatch logo seochat tools logo