Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
centering content in a div?
Old 04-17-2006, 07:53 PM centering content in a div?
Junior Talker

Posts: 3
Trades: 0
I have a main div, it's centerd on the page using
Code:
    margin-left: auto;
    margin-right: auto;
and it has a background image in it. I want the content inside of it to be centered in it. I tried doing this by
Code:
padding-right: 15px;
    padding-left: 15px;
I also tried text-align but the content doesn't center:
http://www.superhyperglobalmeganet.com/test4.html

How can I center the content in the main div?

Last edited by warpdesign; 04-17-2006 at 08:25 PM..
warpdesign is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-17-2006, 08:31 PM Re: centering content in a div?
The Ape's Avatar
Super Talker

Posts: 129
Trades: 0
I deleted a dumb question here. Move on.
__________________

Please login or register to view this content. Registration is FREE

Last edited by The Ape; 04-17-2006 at 09:03 PM..
The Ape is offline
Reply With Quote
View Public Profile Visit The Ape's homepage!
 
Old 04-17-2006, 08:32 PM Re: centering content in a div?
The Ape's Avatar
Super Talker

Posts: 129
Trades: 0
In "outer" you have margin left and right defined twice. I don't know if that will fix your problem, though.

*5 minutes later... nope, that didn't work.
__________________

Please login or register to view this content. Registration is FREE

Last edited by The Ape; 04-17-2006 at 09:04 PM..
The Ape is offline
Reply With Quote
View Public Profile Visit The Ape's homepage!
 
Old 04-17-2006, 09:20 PM Re: centering content in a div?
The Ape's Avatar
Super Talker

Posts: 129
Trades: 0
Define all of your margins in navigation, columns, and footerTop.
margin-right: auto;
margin-left: auto;
margin-top: whatever;
margin-bottom; whatever;
__________________

Please login or register to view this content. Registration is FREE
The Ape is offline
Reply With Quote
View Public Profile Visit The Ape's homepage!
 
Old 04-17-2006, 09:23 PM Re: centering content in a div?
Junior Talker

Posts: 3
Trades: 0
Yep that works, thanks!
warpdesign is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to centering content in a div?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30963 seconds with 12 queries