Does Internet Explorer understands <span style="margin: 5px;"> ?

Discussion in 'HTML & Website Design' started by Carl29, Jun 1, 2011.

  1. #1
    Hi, I'm wondering if IE does not understand <span style="margin: 5px;">
    I've this website in WP that it has adverts and I'm using adrotate plugin to manage, and the only css rule for the ad block is <span style="margin: 5px;">(before) and </span>(after)

    Please look at the screnshots
    ie8.jpg
    firefox.jpg

    any idea why this happens?

    website at www.fotografiasdeangola.com/en/fotografias-de-benguela
     
    Carl29, Jun 1, 2011 IP
  2. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #2
    Add an extra definition to the span style: display: inline-block; and see how IE reads that.
     
    Clive, Jun 1, 2011 IP
  3. designmonkey

    designmonkey Peon

    Messages:
    70
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    seconding clive, span is an inline element, if you want to add margin you need to define it as block element. either display:blcok, or display:inline-block would do.
     
    designmonkey, Jun 2, 2011 IP
  4. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #4
    Adding display: block; pushes the element to a new line so you may wish to check out what's best in your case.
     
    Clive, Jun 2, 2011 IP
  5. Carl29

    Carl29 Active Member

    Messages:
    114
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #5
    yes; working with inline-block
     
    Carl29, Jun 19, 2011 IP