/    Sign up×
Community /Pin to ProfileBookmark

Alignments (something like colspan)

I’m trying to make align stuff like… two columns side by side aligned left (works) with the div beneath them to center beneth the double column
Using a table:

[CODE]
<TR>
<TD></TD><TD></TD>
</TR>
<TR COLSPAN=2 ALIGN=”center”>
<TD></TD>
</TR>[/code]

So… how do I do this in CSS?
Do I need to impose widths on all the divs?
If yes, how do I measure how many ems in a div?
To get the third div to drop below the others, is “clear:left” the proper method?
Thanks!

The code I have so far:

[CODE] DIV.left {
position: relative; float:left; top: 0; padding-left:1em;
}
DIV.right {
position:relative; float:left; top:0; left:0; padding-left:3em;
}

DIV.bottom {
position:relative; top:0; clear:left; margin-left:5em; margin-right:auto;
width:100%; text-align:left;
}[/CODE]

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@ray326Dec 03.2006 — Yes, they need widths and they don't need relative. EMs are relative to text size. Start with 49% widths minus some for the padding unless you know what you want as an em width for the page. Use clear:both on the bottom.
Copy linkTweet thisAlerts:
@yitzleauthorDec 03.2006 — Thanks.
×

Success!

Help @yitzle 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.27,
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,
)...