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.

HTML Forum


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



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Whats the easiet way to 'center' a website
Old 04-17-2007, 05:10 PM Whats the easiet way to 'center' a website
Skilled Talker

Posts: 64
Trades: 0
www.hissmedia.com

Is there an easy way to center this site. If you could, please work with my code, i know its horrible. I created the site and am having my buddy (html expert) look through it in a week or so.

Thanks.

Last edited by crj900; 04-17-2007 at 05:21 PM..
crj900 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-17-2007, 06:33 PM Re: Whats the easiet way to 'center' a website
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Did that in Dreamweaver WYSIWYG mode right ??

All those absolutely positioned "layers" (they are NOT LAYERS !) are not necessary and they are big trouble. Hopefully your 'html expert' knows that and can straighten it out.

You've got <div id="layer1"> twice - can't do that, ID's must be UNIQUE !

At this point, with that setup:
Add a #wrapper div to contain everything else and give it a width.
In the CSS:
#wrapper{
width: 785px;
position: relative;
margin: 0 auto;
text-align: left;
}

On the body add this:
body{
text-align: center;
}

You need both in order to center in all the good browsers and the 'text-align:center" to make IE6 and below center.

I would highly suggest using Floats for that layout and get rid of all the position: absolute.
__________________
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 04-17-2007, 11:48 PM Re: Whats the easiet way to 'center' a website
Skilled Talker

Posts: 64
Trades: 0
Im a little confused. If I delete all of my layers, and replace it with that one, how would my images/text know where to go?
crj900 is offline
Reply With Quote
View Public Profile
 
Old 04-18-2007, 03:37 AM Re: Whats the easiet way to 'center' a website
Super Talker

Posts: 121
Name: Ared
Trades: 0
it will have a problem.. you must check all the previous code before applying that..
Ar3d is offline
Reply With Quote
View Public Profile
 
Old 04-18-2007, 03:59 AM Re: Whats the easiet way to 'center' a website
Super Spam Talker

Posts: 755
Name: Barry O' Brien
Location: Ireland
Trades: 0
I use dream weaver having 10% margins on both sides
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
audiomad is offline
Reply With Quote
View Public Profile Visit audiomad's homepage!
 
Old 04-18-2007, 05:06 AM Re: Whats the easiet way to 'center' a website
BruceWayne's Avatar
Extreme Talker

Posts: 182
Trades: 0
The page is on center now, anyway, you got a nice site !
BruceWayne is offline
Reply With Quote
View Public Profile Visit BruceWayne's homepage!
 
Old 04-18-2007, 11:20 AM Re: Whats the easiet way to 'center' a website
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
If I delete all of my layers, and replace it with that one, how would my images/text know where to go?
I never said ANYTHING about deleting your "layers" ! I told you to ADD a div named #wrapper and put it AROUND what you already have.

That means:
<div id="#wrapper">
blah blah blah - the rest of your layout
</div> <!--end wrapper -->

Getting rid of 'position:absolute' does NOT mean deleting, it means using floats and the normal document flow to lay out your page.

No, it's not centered - it's too far to the right to be actually centered.
__________________
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 04-18-2007, 02:24 PM Re: Whats the easiet way to 'center' a website
Super Spam Talker

Posts: 755
Name: Barry O' Brien
Location: Ireland
Trades: 0
I also found that having three layers left and right layers at 25% width and the center 50%
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
audiomad is offline
Reply With Quote
View Public Profile Visit audiomad's homepage!
 
Reply     « Reply to Whats the easiet way to 'center' a website
 

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