/    Sign up×
Community /Pin to ProfileBookmark

CSS Positioning

I’d like to make a table extent from the very left of the screen to the very right, mainly because I want the site to be divided in 3 sections, the top will be the banner and the banner will blend with the background, then a menu extending from the left to right of the screen, and a table containing the contents of the site below, which would be a set size with a background different from that in the banner section. I’m using “.all {position:absolute; left:0px; top:0px}” right now in order to get the table to be fully to the left but there’s a space on the right side of the page that the table won’t cover even though it’s 100%.

I’d appreciate any help anyone could offer.

to post a comment
CSS

7 Comments(s)

Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYNov 03.2005 — You should not use table for layout, but instead write semantical and valid markup. Then style it and position it with CSS.
Copy linkTweet thisAlerts:
@RUredENov 06.2005 — {position:absolute; left:0px; top:0px; margin-right:0px; }

if that dosn't help try adding margin-right:0px; in your body{}
Copy linkTweet thisAlerts:
@LJKNov 06.2005 — Hi -

It's usually better to have div containers for content

to control placement - or use relative positioning whenever

possible instead of absolute - which will tweak the element

from it's original position in the 'flow' vs. placing it according

to the browser window.

Have you tried floating divs instead of using tables yet?

Good luck,

El

P.S. - No px is required on a value of 0.
Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYNov 06.2005 — No unit [I]at all[/I] is required for 0, no 0em, 0%, 0px, etc..
Copy linkTweet thisAlerts:
@EbolaauthorNov 08.2005 — I was able to do what I wanted, and now I am trying to do the site in div containers, the banner and menu bar worked fine, but now I'm trying to place tables alongside each other like this:

{ [ main content table ] [ Links and such] }

Both are in different div containers, and I tried floating them left and right(The div containers), and though that placed them on the same level the main content table was also moved left along the side of the screen and the links were pushed to the right. Whenever I add an align="center" to the div containers, it only affects my text and doesn't move the actual tables. I'd like to keep a buffer of white space both between the tables and from the edge of the screen.

I know I could fix this so easily with nested tables too >_<

Any suggestions?

E: Also I have one of my content tables set to 500px but when I tested what would happen if the text was longer than 500 instead of going down to the next line it extends the table longer than 500px. Is there anyway to prevent this?
Copy linkTweet thisAlerts:
@ray326Nov 09.2005 — Put it up so we can see it or check out the Cederholm and Wyke-Smith refs in my sig.
Copy linkTweet thisAlerts:
@uptoomeNov 09.2005 — http://www.cssplay.co.uk/

You'll find a lot of good examples showing layout, menus, boxes, etc.
×

Success!

Help @Ebola 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.18,
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,
)...