Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Jan 2008
    Posts
    20
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Mysterious Padding

    I'm having a padding appearing where there shouldn't -- it only appears in Internet Explorer. Safari depicts the page just as it should.

    Here it is.

    Explorer gives me a padding between the top border and the text. It doesn't produce a padding above the image, though, but I have margins set for the image.

    Here's the relevant coding:

    Code:
    #black p {padding:0 10px;}
    
    #news {width:515; min-height:210px; border:solid 1px #2A2A2A; margin:10px; padding-top:0;}
    #news img {float:left; width:145px; margin:12px 10px 10px 10px;}
    I tried adding "margin:0" to the #news-box but that doesn't work.

    The #news DIVs are the boxes in which the pics and text are in.

    Help would be greatly appreciated!

  • #2
    Regular Coder ajhauser's Avatar
    Join Date
    Nov 2007
    Location
    Earlville. It's where Earls come from.
    Posts
    226
    Thanks
    74
    Thanked 1 Time in 1 Post
    One thing you may want to try is actually changing the margin and padding on your "p" tags. Right now they take up 2 lines, and in IE this causes wierd crap to happen, like text not being flush at the top...

    for example:

    Code:
    p {
    margin: 0px;
    padding: 0px
    }
    Then just go back and add in a spaceholder where you want your lines to look double spaced. For example:

    Code:
    <p><i>14 February 2008</i> | I<font size="-3">NDIANA</font> J<font size="-3">ONES</font> IV</p>
    
    <p>&nbsp;</p>
    
    <p>The first trailer for the fourth Indiana Jones film, <i>The Kingdom of the Crystal Skull</i>, produced after more than a decade since the last installment in the series...</p>
    Hope that helps.
    AJ

  • #3
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Um. Really, a no-break space doesn't count as a paragraph.

    I'd use
    Code:
    <<p><i>14 February 2008</i> | I<font size="-3">NDIANA</font> J<font size="-3">ONES</font> IV</p>
    
    <div style="height: 1.5em; /* or whatever your line-height is--preferably use a class */"></div>
    
    <p>The first trailer for the fourth Indiana Jones film, <i>The Kingdom of the Crystal Skull</i>, produced after more than a decade since the last installment in the series...</p>

  • #4
    New Coder
    Join Date
    Jan 2008
    Posts
    20
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Well then I'd have to edit about a hundred pages manually which is obviously not something I'd be looking forward to

  • #5
    Regular Coder ajhauser's Avatar
    Join Date
    Nov 2007
    Location
    Earlville. It's where Earls come from.
    Posts
    226
    Thanks
    74
    Thanked 1 Time in 1 Post
    Well, you could also create a class and apply it to the first <p>. For example:

    Code:
    .NoMarginNoPadding{
    margin: 0px;
    padding: 0px;
    }
    In your Css, and:

    Code:
    <p class="NoMarginNoPadding"><i>14 February 2008</i> | I<font size="-3">NDIANA</font> J<font size="-3">ONES</font> IV</p>
    
    <p>The first trailer for the fourth Indiana Jones film, <i>The Kingdom of the Crystal Skull</i>, produced after more than a decade since the last installment in the series...</p>
    Would that give the result you're looking for?
    -AJ

  • Users who have thanked ajhauser for this post:

    Ottens (02-21-2008)

  • #6
    New Coder
    Join Date
    Jan 2008
    Posts
    20
    Thanks
    5
    Thanked 0 Times in 0 Posts
    I figured it out -- I think...

    Thanks for your help!

  • #7
    Regular Coder ajhauser's Avatar
    Join Date
    Nov 2007
    Location
    Earlville. It's where Earls come from.
    Posts
    226
    Thanks
    74
    Thanked 1 Time in 1 Post
    No problem, glad you got it.
    AJ


  •  

    Posting Permissions

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