SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: <p> spacing?

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    <p> spacing?

    I am lost [again].

    Don't know when it started, and cannot figure out how to correct this - but for whatever reason, new paragraphs are not spacing correctly. If I want some whitespace between paragraphs, I would have to have a blank set of <p> tags in between paragraphs with text.

    Don't know if it's related, but the <blockquote> tags no longer work. And if I want a table to center (yes, I am still having to resort to using them for some items) - I can't use "align=center", but have to place <center> tags around them.

    I uploaded a sample page at http://texasdogsonline.com/ga2006/silkens.htm - the CSS stylesheet can be found at http://texasdogsonline.com/ga2006/kindaplain.css

  2. #2
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well...I found the <p> problem - but still haven't figured out the <blockquote> and table-aligning issues


    Lynn

  3. #3
    SitePoint Addict Jamieharrop's Avatar
    Join Date
    Mar 2005
    Location
    West Yorkshire, UK
    Posts
    210
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Care to share what the solution was gryffn? It may help others in the future.
    Regards,
    Jamie Harrop

  4. #4
    Chillin like a Villain DaStuff's Avatar
    Join Date
    Jul 2003
    Location
    Huntington Beach
    Posts
    649
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just place a top margin into your css file... This is what one of mine looks like:
    p { font-size:1.0em; line-height:1.5em; margin:1.2em .5em 0em .5em; }
    • Follow the dancing banana

  5. #5
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For me it was adding { padding-bottom: 1em }

    Although I still cannot figure out what is causing it to do it in the first place!

  6. #6
    Brevity is greatly overrated brandaggio's Avatar
    Join Date
    Dec 2005
    Posts
    1,424
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You probably zeroed out the margins and padding with the universal selector like so:
    * { margin: 0; padding: 0; }

    Now (as you have found) unless you explicitly add margins or padding to tags there isn't any (with some very rare exceptions).

  7. #7
    Chillin like a Villain DaStuff's Avatar
    Join Date
    Jul 2003
    Location
    Huntington Beach
    Posts
    649
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by gryffyn
    For me it was adding { padding-bottom: 1em }

    Although I still cannot figure out what is causing it to do it in the first place!
    Yes padding works similar to the margin. Also I'd have to agree with john above.. Most likely it was caused by changing something in your css to take out the margins.

    If you haven't touched the css recently then it was probably just some sort of browser glitch which caused you not to see it initially (they are quirky like that).

    Don't worry though, it's better to leave nothing up to chance and always apply margins(or padding) to your fields if you expect it to be there.. Hold the browsers hand, don't let it walk on its own
    • Follow the dancing banana


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
  •