SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Member
    Join Date
    Jun 2000
    Location
    Netherlands
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use very small fonts all over my site so the space between two paragraphs is too big.

    How can I change the space between two paragraphs in a stylesheet. I mean when you press the enter button in your web-editor when you've entered some text.

    Thanks
    networktm

  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The best thing would be to post an example of your code, or a link to the page in question so we can check it out. It might be something simple enough that you would not have to use stylesheets.

    I will assume that you are using Dreamweaver though, as it adds a <P> tag when you hit the Enter key.

    Check your source and see if there is a <p> and </p> tag before and after your paragraph. To be most efficient, you should use <P> on the outside of your text and a double <BR> between paragraphs. Like so:

    <p>
    This is the beginning of a beautiful friendship. This is the beginning of a beautiful friendship. This is the beginning of a beautiful friendship. This is the beginning of a beautiful friendship. This is the beginning of a beautiful friendship. This is the beginning of a beautiful friendship.
    <br><br>
    This is the beginning of a beautiful friendship. This is the beginning of a beautiful friendship. This is the beginning of a beautiful friendship. This is the beginning of a beautiful friendship. This is the beginning of a beautiful friendship.
    <br><br>
    This is the beginning of a beautiful friendship. This is the beginning of a beautiful friendship. This is the beginning of a beautiful friendship. This is the beginning of a beautiful friendship. This is the beginning of a beautiful friendship.
    </p>
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    SitePoint Member
    Join Date
    Jun 2000
    Location
    Netherlands
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Works!!!

    The <br><br> tags work Great!!!

    The site isn't live yet so I can't show you an example.

    Thanks!!!

  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    my pleasure...just glad that I could help.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  5. #5
    SitePoint Wizard Goof's Avatar
    Join Date
    Feb 2001
    Location
    Pittsburgh, PA
    Posts
    1,154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    creole to the rescue again!

    Goof
    Nathan Rutman
    A slightly offbeat creative.

  6. #6
    SitePoint Wizard
    Join Date
    Jan 2001
    Location
    Milton Keynes, UK
    Posts
    1,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you want a bit more control, enclose each paragraph in an opening/closing paragrapgh tag and use the css attribute 'margin' to set the spacing between the paragraph tags.

    Style code:
    Code:
    <style>
    p {
      margin: 5px 0px 5px 0px
    }
    </style>
    HTML code:
    Code:
    <p> 
    This is the beginning of a beautiful friendship. This is the
    beginning of a beautiful friendship. This is the beginning of a
    beautiful friendship. This is the beginning of a beautiful
    friendship. This is the beginning of a beautiful friendship. This
    is the beginning of a beautiful friendship. 
    </p>
    <p>
    This is the beginning of a beautiful friendship. This is the
    beginning of a beautiful friendship. This is the beginning of a
    beautiful friendship. This is the beginning of a beautiful
    friendship. This is the beginning of a beautiful friendship.
    </p>
    The style code sets the top and bottom margins for the <p> tag to 5px and the side margins to 0px. The other way you could do it is use the attributes 'margin-top' and 'margin-bottom' instead.
    Last edited by shane; Apr 6, 2001 at 04:46.

  7. #7
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Shane...W3C does not recommend using adjoining P tags like that. If you have large chunks of text, then you really should use BR between the paragraphs instead of closing and then opening another P tag.

    If you really want to adjust margin, then style the BR.
    Last edited by creole; Apr 6, 2001 at 13:43.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  8. #8
    SitePoint Wizard
    Join Date
    Jan 2001
    Location
    Milton Keynes, UK
    Posts
    1,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can't say I was aware of that recommendation creole. I've had a quick look through the W3C's html and accessibility specs., but couldn't find the related piece. Could you give us a link?

    Thanks.

  9. #9
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I didn't know that either... you learn something every day.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  10. #10
    Anyone seen my cypher? OneChance's Avatar
    Join Date
    Apr 2001
    Location
    Seattle
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I also couldn't find anything at the W3C site about adjoining P tags. Having adjoining P tags makes sense, to separate paragraphs. I mean, isn't that what the P stands for? I always thought it was bad design to have successive BR tags.
    Last edited by OneChance; Apr 20, 2001 at 14:35.


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
  •