Help with Positioning a Paragraph

Discussion in 'HTML & Website Design' started by wd_2k6, Jul 1, 2008.

  1. #1
    Hi I was wondering if the following was possible.. and how to go about this.

    OK I have orderered in the Source (Cannot be changed)

    <p>A paragraph..Dyanmic Height, could consist of lots or few words.</p>
    <div>Some Content, nested DIV's etc, all wrapped in this DIV Which has a fixed height of 500px</div>

    OK now how do I make the paragraph appear below the DIV? What's the best way to go about this?
    Should I add a margin-top: 500px to the Paragraph, and margin-top: -500px to the DIV? This would lead to a gap the same of the size of the pargraph I guess?

    The only other way I can think is Absolute Positioning, but I hear people curse it, and seeing as the Paragraph is of dynamic height, it would be hard for any content to appear directly under the paragraph I guess..?
     
    wd_2k6, Jul 1, 2008 IP
  2. LindseyInteractive

    LindseyInteractive Well-Known Member

    Messages:
    2,830
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    175
    #2
    Why don't you put the <p></p> tags below the div?

    Is there a reason why? Cause to me it seems that if you wanted the paragraph to appear below the <div> then you would just simply switch their position, and then decrease the div margin a bit.
     
    LindseyInteractive, Jul 1, 2008 IP
  3. q7m

    q7m Well-Known Member

    Messages:
    1,178
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    150
    Digital Goods:
    1
    #3
    Move the <p></p> below the </div> or forget about this. It's very hard to find a css solution to work fine in many browsers.
     
    q7m, Jul 1, 2008 IP
  4. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi,

    The p is ontop of the DIV for SE reasons, I have just used position: absolute; to throw it where I want it for the moment, looks OK in FF and IE7 for now!
     
    wd_2k6, Jul 2, 2008 IP