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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    May 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tables / divs not aligning properly

    Hi,

    I am terrible at coding, I'm going to admit that straight out right now.

    I'm trying to expand the width of the main content seen here (by putting a width of 600px on the div):
    http://www.lostnhound.com/newsite/index.html

    Code:
    <td valign="top"><div class="bodyText" style="width: 600px;">I live near a busy road and one morning, I saw a stray dog wandering 
    the street without a leash or an owner. I tried to approach the dog to
     read his tag; however, he was too scared. He ran towards traffic and 
    what I thought might be a terrible fate. This is why I have started 
    www.LostnHound.com. Owners can register their pets, and if a stray 
    animal is spotted, this site can be usettd to notify the animal's owner!
    By the way, the Lab carried on and wasn't injured on the busy street! </div></td>
    With the part about "I live near a busy street..." etc. I set the width to about 600 pixels, but as you see, it has changed the layout (the top navigation is meant to be much more left). Also, it's beginning to show the background repeating, which I don't want. It should stop after the dog.

    What am I doing wrong?
    I heard I shouldn't use tables. But I'm confused on how I would work only divs in this...
    Thanks in advanced!
    Last edited by tiar; 05-20-2009 at 11:53 PM.

  • #2
    Senior Coder
    Join Date
    Oct 2005
    Posts
    1,340
    Thanks
    0
    Thanked 61 Times in 60 Posts
    The <style> stuff is supposed to be between the <head> tags.

  • #3
    New to the CF scene
    Join Date
    May 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by drhowarddrfine View Post
    The <style> stuff is supposed to be between the <head> tags.
    Even if I put it in the header tags it does not work, or in my stylesheet.
    Very confused.
    Thanks for the suggestion anyhow.

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,866
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Hi tiar, I'd recommend you tot check why using tables for layout is very bad.

    Also, have a look at http://bonrouge.com/2c-hf-fixed.php, to see how to make a good, CSS based, 2 column layout.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    Regular Coder Zangeel's Avatar
    Join Date
    Oct 2007
    Location
    public_html/
    Posts
    638
    Thanks
    17
    Thanked 79 Times in 79 Posts
    for the background use css

    Code:
    background-repeat:no-repeat;
    it will stop it from repeating


  •  

    Posting Permissions

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