Would simply like to add some padding or margin

Discussion in 'HTML & Website Design' started by chrisj, Nov 13, 2007.

  1. #1
    Would simply like to add some padding or margin to move this line of code to the right. Can you tell me how? Thanks

    <IMG src="/sfolder/images/clear.gif" width=1 height=5><br><IMG src="/sfolder/images/link_arrow.gif"> <a href="?action=login">Home</a><br><
    Code (markup):
     
    chrisj, Nov 13, 2007 IP
  2. JeffHood

    JeffHood Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hello. You can use the CSS property 'padding-left' to apply padding to an element like so:

    <IMG src="/sfolder/images/link_arrow.gif" style="padding-left:32px;">
    HTML:
     
    JeffHood, Nov 13, 2007 IP
  3. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #3
    i'd use margin-left:32px; to move it right.

    Plus:

    <img src="/sfolder/images/clear.gif" alt="clear gif" width="1" height="5" /><br /><img src="/sfolder/images/link_arrow.gif" alt="arrow" /> <a href="?action=login">Home</a><br />
    Code (markup):
    Sorry, I just wanted to make the code look pretty.
     
    twistedspikes, Nov 13, 2007 IP
  4. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #4
    That's not pretty. What the hell is a clear GIF? Sounds like crappy markup to me.
     
    soulscratch, Nov 13, 2007 IP
  5. libertygone

    libertygone Active Member

    Messages:
    2,625
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    90
    #5
    maybe it's a pixel shim? or some sort of hack... he's probably putting it in there to push something over instead of using padding or margin :confused:
     
    libertygone, Nov 13, 2007 IP
  6. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #6
    That was already there. I just simply made the code he gave better.
     
    twistedspikes, Nov 13, 2007 IP
  7. photodreamz

    photodreamz Guest

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    you could do something as simple as img {margin-left: 10px;}
     
    photodreamz, Nov 13, 2007 IP
  8. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #8
    Or you could re-do the nav entirely and use the right elements for the right job. I'm pretty sure that's the nav and he's using misusing the image element which is supposed to be used for content, when it should just be a background image on an LI.
     
    soulscratch, Nov 13, 2007 IP