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
Need help centering my page for all browsers!
Old 11-29-2004, 05:36 PM Need help centering my page for all browsers!
iceman35's Avatar
Extreme Talker

Posts: 210
Location: New York
Trades: 0
does anyone know the code to center the page or so that every browser like 800x600 can view my page without having to scroll left or right?
iceman35 is offline
Reply With Quote
View Public Profile Visit iceman35's homepage!
 
 
Register now for full access!
Old 11-29-2004, 06:14 PM
karinne's Avatar
Extreme Talker

Posts: 197
Location: Quebec, Canada
Trades: 0
hope this helps - http://www.sitepoint.com/forums/show...42&postcount=9
__________________

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


Getting on the Web Standards band-wagon? Get these books -
Please login or register to view this content. Registration is FREE
and
Please login or register to view this content. Registration is FREE


Takin' in the view from the outside. Feeling like the underdog. Watching through the window I'm on the outside. Living like the underdog.
-Dream Theater
karinne is offline
Reply With Quote
View Public Profile Visit karinne's homepage!
 
Old 11-30-2004, 01:20 AM
kalkm's Avatar
Experienced Talker

Posts: 31
Trades: 0
Hi,

If you are using tables, you could use the following code:

<TABLE WIDTH=780 align="center">

This would centre your table in the browser window.

Hope this is what you were looking for.

Good luck,

Mark.
kalkm is offline
Reply With Quote
View Public Profile
 
Old 11-30-2004, 03:10 AM
Novice Talker

Posts: 8
Trades: 0
Using CSS...
Code:
HTML:
<div class="div1">
<div class="div2">

...Centered Material....

</div>
</div>


CSS:
div.div1 {position: absolute; top: 0; left: 50%; width: xx}
div.div2 {position: absolute; top: 0; left: -50%;}
__________________
<? if (!$succeed){$try++;} ?>

Please login or register to view this content. Registration is FREE
and
Please login or register to view this content. Registration is FREE
services.
Max Powers is offline
Reply With Quote
View Public Profile
 
Old 11-30-2004, 08:53 AM
Rincewind's Avatar
Super Talker

Posts: 108
Trades: 0
Max Powers has a bug in his css. You need to put a width into his div2 and the width in div1 is not required and will create horizontal scroll bars if greater than half the screen width. Also you could use better naming conventions. Try this code:
Code:
<html>
<head>
<style type="text/css">
#marker {position: absolute; top: 0; left: 50%;}
#container {position: absolute; top: 0; left: -50%; width:500px;}
</style>
</head>
<body><div id="marker">
<div id="container">
Content goes here
</div>
</div>
</body>
</html>
Alternativly you can have a flexable design that resizes to fit the screen somewhat. Try this css
Code:
#marker {position: absolute; top: 0; left: 50%; width: 40%}
#container {position: absolute; top: 0; left: -100%; width:200%;}
I've set the container width to 200% so it takes twice the width of the marker and the market is set a width below 50% in order to preven horizontal scroll bars.
__________________
Q-4.net -
Please login or register to view this content. Registration is FREE

Stylegallery.co.uk -
Please login or register to view this content. Registration is FREE

Splodgy.com -
Please login or register to view this content. Registration is FREE
Rincewind is offline
Reply With Quote
View Public Profile
 
Old 12-28-2004, 09:18 PM
Novice Talker

Posts: 8
Trades: 0
Good calls, Rincewind! I never checked over my code. Shame, shame on me.
__________________
<? if (!$succeed){$try++;} ?>

Please login or register to view this content. Registration is FREE
and
Please login or register to view this content. Registration is FREE
services.
Max Powers is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Need help centering my page for all browsers!
 

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