/    Sign up×
Community /Pin to ProfileBookmark

Hi,

I am having problems to center the <body> content in the middle when the screen size is larger than 600 X 800. In this case ( larger screens) the tables and cells occupy diferent parts of the screen messing up the general outlook.

The solution I tought would be to use a <div center> just before the <body> tag and at the end of it but there might be more effective solutions for this problem using external CSS sheets.

The page I am talking about is at [URL=http://www.floripaimages.com]Floripa[/URL]

Appreciate any help.

Cheers

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@ffurnaiJun 28.2005 — a <div> before the <body> tag = invalid code.

to center everything within the <body> add this to the style
[CODE]<head>
<style type="text/css">
body {
text-align: center;
}
</style>
</head>[/CODE]


but, this centers everything.

Another way would be to have a central "wrapper" div
[CODE]<head>
<style type="text/css">
#wrapper {
width: 500px;
border: 1px solid #ccc;
margin: 0 auto;
}
</style>
</head>
<body>
<div id="wrapper">Stuff</div>
</body>[/CODE]
Copy linkTweet thisAlerts:
@sandro27authorJun 28.2005 — Hi,

thanks for your reply.unfortunately the wrap solution didn´t work well cuz I am using Css to align other objects, so what happens is "wrap" centers only the middle collumn. I need all the elements to be centered in a large screen to viewed like in a 600X 800 but of course with the spaces on the right and left sides.
Copy linkTweet thisAlerts:
@ffurnaiJun 28.2005 — Hmmmm, I guess I don't really understand what you're trying to achieve. You can put all your columns within the #wrapper div but change the width to be 800px.
×

Success!

Help @sandro27 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...