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.

Website Design Forum


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



Freelance Jobs

Reply
How do I center the page?
Old 05-30-2007, 05:08 PM How do I center the page?
Experienced Talker

Posts: 48
Name: Harold
Trades: 0
I am trying to build a Website that has the same properties of: http://www.thomasville.com/, in that the background is centered regardless of your screen's resolution. How do I do this?
Hans G. is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-30-2007, 05:12 PM Re: How do I center the page?
Skilled Talker

Posts: 62
Trades: 0
use css,

in your html code add a div that contains all your content
e.g
<div id="all">
content
content
content
</div>

then in your css file add something like this in

#all{
width:600px;
margin:0 auto;
}




done
jameslow is offline
Reply With Quote
View Public Profile
 
Old 05-30-2007, 06:02 PM Re: How do I center the page?
Experienced Talker

Posts: 48
Name: Harold
Trades: 0
Thanks a million! Will try it out tomorrow!

H
Hans G. is offline
Reply With Quote
View Public Profile
 
Old 05-30-2007, 07:58 PM Re: How do I center the page?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
That's only HALF the solution though.
margin: 0 auto; - will work not center the container in IE 6 or below.

To fix that you need to also add this:
body{
text-align: center;
}

And then you'll need to add "text-align: left;" to the rules for the container that is being centered - to #all in the above example.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

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


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

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-31-2007, 06:16 AM Re: How do I center the page?
Skilled Talker

Posts: 62
Trades: 0
i did not know that, so is margin:0 auto; needed or should you just use text-align:center all the time ?
jameslow is offline
Reply With Quote
View Public Profile
 
Old 05-31-2007, 06:18 AM Re: How do I center the page?
Skilled Talker

Posts: 74
Name: Nick Barrett
Location: Brighton
Trades: 0
IE 6 doesn't count any more, if a user hasn't upgraded I don't feel they deserve to see my sites as they really are. In fact this is also true for IE 7 but I do make my sites work for that occasionally.
__________________

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

24/7 Support | 99.5% uptime | shared | reseller | dedicated
Looking for a webhost? Try
Please login or register to view this content. Registration is FREE
!
Political Monst is offline
Reply With Quote
View Public Profile
 
Old 05-31-2007, 11:04 AM Re: How do I center the page?
Skilled Talker

Posts: 62
Trades: 0
^^^ yeah ok good luck to you then
jameslow is offline
Reply With Quote
View Public Profile
 
Old 05-31-2007, 11:58 AM Re: How do I center the page?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
There is a sticky at the top of this forum regarding centered layouts.

IE 6 is still THE major percentage of users. Excluding such a large audience is just plain foolish, but then, maybe your site is merely for vanity anyway.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

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


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

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-02-2007, 02:32 AM Re: How do I center the page?
highanddry's Avatar
Close Talker

Posts: 880
Name: Jacob
Trades: 0
I like the design ideas of your site. Good Luck
highanddry is offline
Reply With Quote
View Public Profile
 
Old 06-05-2007, 09:22 PM Re: How do I center the page?
Novice Talker

Posts: 10
Trades: 0
Margins can be hell. What looks good in I.E looks bad in F.F. Remember I.E adds
more pxs on each side of a box.

<notagz1>
notagz1 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How do I center the page?
 

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 1.23957 seconds with 12 queries