tags:

views:

40

answers:

1

My current project used tables for layout design and I am trying to convert everything to use CSS with DIV's and other elements besides tables.

MY project consist of;

Header file
body file
footer file

When I used tables I would just start a table in the header before the body file started and then in the footer I would close that table, I used this method to make sure everything was always within a set width for example 800px wide centered.

So with div's I tried replacing this table in the header/footer with something like this

<div class"body_wrapper">
<!-- end header - begin body -->


body fle contents


<!-- end body - begin footer -->
</div>

my css for the body_wrapper div

.body_wrapper{
    width:800px;
    margin-left: auto ;
    margin-right: auto ;
}

For some reason though this is not working, nothingstays in the 800px centered div,

How can I do what I am trying to dowithout tables?

+4  A: 

You need an = in your div:

<div class="body_wrapper">
Andy Mikula
thanks i overlooked that, maybe you can answer this? Would there be anything that could be in my body section that could prevent other items from staying within this set width wrapper div?
jasondavis
If items have their own margins set, they might get pushed out, but that depends on a few other things as well. Is there a chance you have a `</div>` accidentally somewhere?
Andy Mikula