Page 1 of 1

[solved] How to align ALL content in a DIV

Posted: Tue Dec 09, 2008 3:24 pm
by r00ki3
Hello All,

I made a website which consists out of several DIV's.
1 big DIV (wrapper) and then all the other stuff in it...like a DIV for the HEADER, Menu, Content, Footer etc.

But now my problem is that the content is aligned to the right of the content-DIV.
I solved this problem by putting: "padding-left: 40px;" in the stylesheet for the P tag.

P{
color:#4e351f;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
padding-left: 40px;
}


Now for almost all the content it's okay...as long as it is text! But I also want flash, pictures etc. to align in the same way as the text.

For a live example you can check: http://www.ifurniture.nl/index.php?page=photos

I hope someone can help me with this issue because I got stuck here!

Thnx in advance!

Re: How to align ALL content in a DIV

Posted: Tue Dec 09, 2008 4:19 pm
by Ziggywigged
Why not add that padding to the content div style so it's not just specific to content in a P.

Re: How to align ALL content in a DIV

Posted: Tue Dec 09, 2008 6:56 pm
by doodlebee
You need another div.



content for the whitespace here




Click here to get back to our homepage





In your CSS:

#content {
text-align:center;
}

#stuff {
width:90%;
margin:0 auto;
}

Re: How to align ALL content in a DIV

Posted: Wed Dec 10, 2008 11:26 am
by r00ki3
Awesome!!! It's working! Thnx!

I knew it could be solved...and now I know how :D