Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How do I move a <span> or <p> tag farther down on my page?

When typing the code, I write <span style="margin-top: 30px;"> and it never works. The same thing happens if I switch it to a <p> tag. I don't know how to move it down. I have tried writing <p style="top:30px;"> and <p style="padding-top: 30px;" and none work. What can I do? And why does this happen?

4 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    You have multiple questions here, so I will try to address each separately:

    1) <span style="margin-top: 30px;">

    The span tag cannot accept top and bottom margins unless it is a block level element...

    <span style="display:block; margin-top:30px;">

    2) <p style="top: 30px;">

    When using positioning you must first specify the type of positioning (absolute or relative), then this will work...for example:

    <p style="position: absolute; top: 30px;">

    3) <p style="padding-top: 30px;">

    This SHOULD work, but you may need to specify your paragraph as a block element in order to acheive margin/padding top or bottom...

    <p style="display: block; padding-top: 30px;">

    Source(s): Professional Web Developer
  • 1 decade ago

    All tags in html have their own uses and the problem you are having is that your trying to do something with a tag that it wasn't made to do.

    You have two options 1. use a <div style="margin-top: 30px;"></div> instead or put a <br> above the span although you wont have precise control over how far down the span area is on the page using <br>.

  • 1 decade ago

    Without trying this myself, insert the span into a <div> and see if that works?

  • 5 years ago

    consistent with threat you haven't any longer end the img tag or the image region is incorrect inserted on the code. i will propose you to envision one greater time. consistent with threat, you have finished some coding mistake. the image tag is supported on loads of the browser and on mozilla firefox besides.

Still have questions? Get your answers by asking now.