Span top-margin no effect

Posted on 2007-08-11
Last Modified: 2013-11-05

check here with firefox please :

I want to align the text
"Mail échoué. Excusez-nous........."
with the menu.

I have put this text in a span with margin-top inside a div, but the top margin of the span has no effect.

(I cannot change this structure, actually I load ajax into the div, so I had to make a span inside the div with top margin)

Thank you for any help.

[...]    <div id="contentwide"><span style="margin-top: 20px;">Mail échoué.<br>     [...]
Question by:matthew016
    LVL 30

    Accepted Solution

    Hi Matthew,

    You cannot give an inline element vertical margin/padding... either change it to a p tag, or you can add display:block to the span

    LVL 9

    Author Comment


    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Suggested Solutions

    Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
    Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
    In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
    The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now