SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Oct 2003
    Location
    UK
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Weird <div id> drop in FF&Safari

    Hi Guys,

    Take 2 pages I have built using CSS. They have exact same header graphic but the content block I use on each page differs slightly in that it refers to CSS that is slightly different.

    The FETCH PAGE uses a DIV for the content (the white block), but the block falls down the page slightly.
    Code:
    #fetch {
    	width: 700px;
    	background-color: #FFF;
    	text-align: left;
    	height: 450px;
    	margin: auto;
    }
    The CONTACT PAGE also uses a DIV for the content (the white block), but doesn't have the 'height' and renders as I would expect it to.
    Code:
    #block {
    	width: 700px;
    	background-color: #FFFFFF;
    	margin: auto;
    	text-align: left;
    }
    I'm thinking that the 'height' in the first incorrect sample above is causing my odd dropping block, but why?

    BTW, this seems to be just a SAFARI & FIREFOX thing.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,821
    Mentioned
    158 Post(s)
    Tagged
    4 Thread(s)
    Hi,

    Its probably the default margins and padding on the form affecting the layout.

    Try this:

    Code:
    form {margin:0;padding:0}
    Paul

  3. #3
    SitePoint Member
    Join Date
    Oct 2003
    Location
    UK
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Paul O'B
    Hi,

    Its probably the default margins and padding on the form affecting the layout.

    Try this:

    Code:
    form {margin:0;padding:0}
    Paul
    You are correct! A lesson learned for me.

    Many thanks.


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
  •