[solved] How to align ALL content in a DIV

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
r00ki3
Forum Members
Forum Members
Posts: 87
Joined: Thu Apr 12, 2007 11:16 am

[solved] How to align ALL content in a DIV

Post 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!
Last edited by Anonymous on Thu Dec 25, 2008 9:58 pm, edited 1 time in total.
Ziggywigged
Power Poster
Power Poster
Posts: 424
Joined: Sat Feb 02, 2008 12:42 am

Re: How to align ALL content in a DIV

Post by Ziggywigged »

Why not add that padding to the content div style so it's not just specific to content in a P.
Take a penny, leave a penny.
doodlebee
Forum Members
Forum Members
Posts: 13
Joined: Mon Dec 08, 2008 9:22 pm

Re: How to align ALL content in a DIV

Post 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;
}
r00ki3
Forum Members
Forum Members
Posts: 87
Joined: Thu Apr 12, 2007 11:16 am

Re: How to align ALL content in a DIV

Post by r00ki3 »

Awesome!!! It's working! Thnx!

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

Return to “Layout and Design (CSS & HTML)”