View Full Version : Tables / divs not aligning properly

May 20th, 2009, 11:51 PM

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):

<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! :)

May 21st, 2009, 12:21 AM
The <style> stuff is supposed to be between the <head> tags.

May 21st, 2009, 12:25 AM
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.

May 21st, 2009, 09:52 AM
Hi tiar, I'd recommend you tot check why using tables for layout is very bad (http://www.hotdesign.com/seybold/).

Also, have a look at http://bonrouge.com/2c-hf-fixed.php, to see how to make a good, CSS based, 2 column layout.

May 21st, 2009, 12:56 PM
for the background use css


it will stop it from repeating