SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2003
    Location
    Seattle
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Padding issue with IE5 and Firebird!?

    I'm having a strange padding issue with both IE5 and Firebird. Here's the code:

    Code:
    #content	{
    	position: absolute;
    	top:100px;
    	margin:0;
    	padding:0;
    	border:0;
    	}
    	
    #text	{
    	position: relative;
    	background:#FFFAD2;
    	border-top: 2px solid #F1F155;
    	border-right: 1px solid #AAB563;
    	border-bottom: 1px solid #AAB563;
    	padding: 0 15px 0 15px;
    	margin-top:0;
    	margin-bottom:20px;
    	margin-right:230px;
    	margin-left:20px;
    	width:auto; 
    	}
    
    #blurb1 {
    	position: absolute;
    	top: 0px;
    	right:20px;
    	background: #4F599C;
    	padding: 0px 10px 5px 10px;
    	border-top: 1px solid #AAB563;
    	border-right: 1px solid #664800;
    	border-bottom: 1px solid #664800;
    	height: 161px; /*Fool IE*/
    	width: 171px; /*Fool IE*/
    	voice-family: "\"}\""; 
    	voice-family:inherit;
    	height: 150px; /*Real deal*/
    	width: 150px; /*Real deal*/
    	}
    html>#blurb1 {
    	width: 150px; /* Be nice to Opera */
    	height: 150px;
    	}
    IE5 shows no padding on the "blurb", while showing padding (appears to be 10px) on the "text" box. Firebird shows what appears to be 10px on both "blurb" and "text", regardless of whether or not I set the padding to 0.

    I've set margins and padding on "body" to 0, so I'm not sure what I'm missing...

  2. #2
    SitePoint Member
    Join Date
    Aug 2003
    Location
    London
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's difficult to tell without seeing the html but I don't think your box model hack figures for height add up. It seems to be 5px + 1px + 1px + 150px.

    Are you sure it's padding that is showing and not margin? If not you could try setting margin: 0; on blurb1

    Anne Marie

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2003
    Location
    Seattle
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, I should have posted the HTML.

    It is basically this:
    Code:
    <div id="content">
    <div id="text">
    </div>
    <div id="blurb>
    </div>
    </div>
    Obviously I've shortened it, but both the blurb and text fall inside the content box.

    What I don't understand is that margin and padding are set to 0 for the text box, and it shows padding (or margin) in both IE and Firebird.

    My guess (as per usual) is that Firebird is interpreting the CSS right, so I must be doing something wrong...

  4. #4
    SitePoint Member
    Join Date
    Aug 2003
    Location
    London
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    From the css and html you've posted I can't see a problem. Do you have an url so that I can see what you're looking at.

  5. #5
    SitePoint Enthusiast
    Join Date
    May 2003
    Location
    Seattle
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll try to post one today or tomorrow. It is still in development, and on an intranet at the moment, so I can't point you to the URL as of yet. Thanks for your willingness to lend some fresh eyes (and brain)!

  6. #6
    SitePoint Enthusiast
    Join Date
    May 2003
    Location
    Seattle
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How very strange...I added this to the CSS:

    Code:
    p {font-size: 1em;
    	padding:0;
    	margin:0;
    	border:0;
    	}
    And the problem was solved. Apparently Firebird was adding its own padding to my <p> tags...

  7. #7
    SitePoint Addict
    Join Date
    Sep 2003
    Location
    Europe
    Posts
    222
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes most elements have a browser default. There is something like an internal browser stylesheet. As long as you don't specifically override these style rules, they will be applied.


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
  •