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 to the CF scene
    Join Date
    Feb 2009
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Why no line spacing in html?

    OK. I'm new at this, but here is a piece of my code. There is no line spacing between the last two links, I am not sure where to put the </br> or if there is another option. Does it have to do with my css?
    you can view the problem at http://www.machineartinc.org/links.html

    <div class="bg">

    <img alt="" src="images/links.gif" class="title" />

    <p class="p"><a href="http://www.cppc.org"><img alt="" src="images/home_cppc.gif" class="logo" /></a><br />
    CPPC - Claims Prevention and procedure Council </p>

    <p class="p"><br /><br /><a href="http://www.moving.org/"><img alt="" src="images/AMSA.gif" class="logo" /></a><br /><br/>
    AMSA - American Moving and Storage Association </p>

    <p class="p"> </br></br><a href="http://www.freshome.com">freshome.com</a></br></br></p>

    <p class="p"></br></br><a href="http://www.coralgableschamber.org">Coral Gables Chamber of Commerce</a></br>

    </div>

  • #2
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    1
    Thanked 1 Time in 1 Post
    <p class="p"> </br></br><a href="http://www.freshome.com">freshome.com</a></br></br></p>

    <p class="p"></br></br><a href="http://www.coralgableschamber.org">Coral Gables Chamber of Commerce</a></br>
    Try <br /> instead. Also, I would try to the <br /> marks outside of the class tags.
    Last edited by slurmdog; 02-25-2009 at 09:36 PM.

  • Users who have thanked slurmdog for this post:

    machineartgirl (02-25-2009)

  • #3
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Quote Originally Posted by slurmdog View Post
    Try <br /> instead. Also, I would try to the <br /> marks outside of the class tags.
    And to add to this, line breaks (<br />) should only be used to actually break the text to wrap onto a new line. They are not appropriate to use for vertical spacing. For spacing issues you can/should use margins/padding as needed to acheive your design goals. Check the tutorial in my sig below to bone up on your HTML/CSS skills and learn the ropes a bit more.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • #4
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    thanks

    ok I was so caught up in where to place the br's that I didn't realize that my syntax was off. Thanks for not laughing. and rowsdower I will check out your tutorial. I am just trying to modify a template that I purchased.

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Could be the validator might help you here. Have a look at your open tag - http://validator.w3.org/check?verbos...org/links.html
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    machineartgirl (02-25-2009)

  • #6
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    validator?

    never used a validator before
    I will now !
    good analogy

  • #7
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Quote Originally Posted by machineartgirl View Post
    never used a validator before
    I will now !
    good analogy
    Check out the links in my sig. It's like a free code checker... it helps but it's not foolproof. There is both valid code that doesn't work and code that works but is not valid.
    It's the best approach to making your site compatable in all browsers.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Tags for this Thread

    Posting Permissions

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