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 3 of 3
  1. #1
    New Coder
    Join Date
    Apr 2008
    Posts
    48
    Thanks
    5
    Thanked 2 Times in 2 Posts

    positioning lots of paragraphs without <br />

    hi everyone,

    i was brushing up on my html/xhtml/css on the w3schools page and it said to never format text by adding lots of empty spaces. well, i know this isn't correct, but that's what i've done on this page: http://www.allisonwrote.com/aussie/people.html

    Without all the line breaks, the text isn't centered to the right of the pictures. How would I fix this using css?

    x
    allison

  • #2
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,179
    Thanks
    174
    Thanked 257 Times in 257 Posts
    take out the <br> between the paragraphs and do this

    only one example
    Code:
    <div style="padding-top:40px;">
    <img class="floatleft" src="http://www.allisonwrote.com/aussie/images/bernard.jpg" alt="boomerang">
    <br>
    <p><strong>Bernard Kelly</strong>, <em> Foreman - Retaining Wall and Drainage Specialist</em></p>
    <p class="close"> Bernard Kelly's expertise in retaining walls and drainage is a 100-year family tradition. From the wilds of Australia to the neighborhoods of Northern Virginia, Bernie brings all of his experience and skills to the table when structural integrity is critical. Familiar with a wide range of techniques and materials, Bernie will work with you to find retaining wall solutions that are as aesthetically pleasing as they are structurally sound.</p>
    </div>
    just wrap each paragraph with this

    Code:
    <div style="padding-top:40px;">
    content
    </div>

  • #3
    Regular Coder Pepe, the bull's Avatar
    Join Date
    Feb 2005
    Location
    Vancouver, WA
    Posts
    163
    Thanks
    1
    Thanked 16 Times in 16 Posts
    When I was playing with the code, I kept getting images aligning funny. I was thinking along the same lines as JC, but with clearing instead of padding. This aligned all of the images to the left in a straight line.

    Code:
    <div style="clear:both;">
    content
    </div>
    Last edited by Pepe, the bull; 05-15-2008 at 11:10 PM.
    Pepe, the bull


  •  

    Posting Permissions

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