SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    firefox moves div when text inserted

    Hi, just registered here. I'm relatively new to css, and can't figure this issue out. It happens in Firefox and Safari, but looks fine in IE .

    I have 3 main parts. header, mainbody, and footer. when I insert a large body of text in the mainbody div, the div moves between the other 2 divs, as if it added a top and bottom margin. Even in a simple format it will do this..

    http://www.faubionart.com/client/soa...gnalliance.php

    I've tried it with a few letters, and everything lines up.

    the final page text will look like this.
    http://www.faubionart.com/client/soa...e_complete.php

    I just need the middle div to adjust with the size of the text. Ive tried setting height, and it still does this. looks fine in IE . searched around on the web, and can't find a solution.
    thanks, Ben

  2. #2
    SitePoint Addict
    Join Date
    Mar 2005
    Location
    Toronto
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is caused by the <p> tag that you have used for your paragraph. <p> tag has its default margin. A fix to this is to specify margin-top/bottom: 0px in css. An easier fix however, is to add a <br> tag on top of your topmost <p> tag like this:

    Code:
    <div id="subpage_extended">
      <br />
      <p>RETURNING THE LAND AND EMPOWERINGTO THE PEOPLE</p>
      <p>Mine Identification and Clearance: Mineseeker Foundation</p>
    In search of the clouds...and maybe some work

  3. #3
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks Kefeso! that br tag worked.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •