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 13 of 13
  1. #1
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using Paragraph Tags as a layout mechanism

    Right, simple question. I am making a design and I have got points where I use:

    <p></p>

    just to break something up and leave a gap.

    Is this use of a paragraph tag considered ok? or should I be using another method?

  • #2
    Regular Coder
    Join Date
    Feb 2004
    Location
    Scotland
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The paragraph tag is supposed to be used to group a selection of words in (surprise, surprise) a paragraph.

    You could probably use it to break stuff up, but you should probably use <br />

  • #3
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Trouble is, <br /> is only acceptable within a paragraph tag, and I am not within a paragraph tag when Im wanting to use <p></p> to break up the content.

  • #4
    Regular Coder
    Join Date
    Feb 2004
    Location
    Scotland
    Posts
    135
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <p>
    ...blah blah blah...<br /><br />

    ...blah blah blah...<br /><br />

    ...blah blah blah...<br /><br />

    ...blah blah blah...<br /><br />

    ...blah blah blah...<br /><br />
    </p>

  • #5
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I understand what you mean, but my design is like:

    Code:
    <div>
        <p>Text</p>
        <div ....>
             <p>Text 2</p>
        </div>
        <p></p>
        <div>
              <p>.....</p>
        </div>
    </div>

  • #6
    Senior Coder
    Join Date
    Aug 2002
    Location
    Kansas City, Kansas
    Posts
    1,518
    Thanks
    0
    Thanked 2 Times in 2 Posts
    I don't even think that <br /> is the best way to go. The ultimate solution would be to add a margin-bottom to the div.

  • #7
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ive thought about that, however it seems to cause some problems when I have tried it before degrading with IE 5... Or am I thinking of padding... I will have a go.

  • #8
    Senior Coder
    Join Date
    Aug 2002
    Location
    Kansas City, Kansas
    Posts
    1,518
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Not sure, but you may have to implement the box model hack found in my signature for ie's deficiencies.

  • #9
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks ill look into it

  • #10
    Senior Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    1,963
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Def. go with margin. Introducing empty <p> tags for margins is as bad as empty table cells for the same thing.

    The issues in IE 5 should be simple to navigate; post if they aren't.

    I take no responsibility for the above nonsense.


    Left Justified

  • #11
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No tags should be used at all if it adds nothing to the content.
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #12
    Senior Coder
    Join Date
    Aug 2002
    Location
    Kansas City, Kansas
    Posts
    1,518
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Exactly what me' said

  • #13
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is that the whammy technique I have heard about?

    Just apply the Whammy-technique : reply to all threads with "morder/spookster/raf is right ..."
    or in this case me'


  •  

    Posting Permissions

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