SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast dziner's Avatar
    Join Date
    Jun 2004
    Location
    Harrisburg
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with Wrapping h3

    I have an h3 tag that runs onto a second line. The h3 has a style of padding-left: 5px, but the second line extends back outside of that 5px padding. Is there an easy fix for this?

  2. #2
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you show us? Sounds a bit odd.

  3. #3
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Is it only happening in IE? Try giving the h3 layout if it is:
    Code:
    /* mac hide \*/
    * h3 {height:1%}
    /* end hide*/
    Some code or s link would probably help if that doesnt work

  4. #4
    SitePoint Enthusiast dziner's Avatar
    Join Date
    Jun 2004
    Location
    Harrisburg
    Posts
    65
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahhah! I figured it out. This page is using inline styles (I know, I know)...

    The code was this:

    HTML Code:
    <div class="contentsection">
    <h3><a href="#" style="color:#003273; text-decoration:none; padding-left: 5px;">Title of section</a></h3>
    <p style="padding-left:5px;">Paragraph info... blah blah blah...</p>
    <p style="padding-left:5px;"><a href="#">Read More &gt; </a></p>
    </div>
    As you can see, the padding-left was applied to the anchor tag, not the h3. So I fixed that.

    Now I have:

    HTML Code:
    <div class="contentsection">
    <h3 style="padding-left: 5px;"><a href="#" style="color:#003273; text-decoration:none;">Title of section</a></h3>
    <p style="padding-left:5px;">Paragraph info... blah blah blah...</p>
    <p style="padding-left:5px;"><a href="#">Read More &gt; </a></p>
    </div>


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
  •