By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,787 Members | 1,124 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,787 IT Pros & Developers. It's quick & easy.

Easy question about CSS positioning

P: n/a
I have been trying to create this layout with CSS in XHTML:

a b

where a and b are both <div> elements with more content inside. I tried
setting `width: 48%' on both and `float: right' on b, but I'm still
getting this layout:

a
b

I know that it's possible to put b next to a using absolute positioning,
but this is at the bottom of a page, and there is an arbitrary amount of
text above this. How can I make a and b line up horizontally? Thanks!

--
Benjamin D. Esham { http://bdesham.net
bd*****@iname.com } AIM: bdesham 1 2 8
There are 10 kinds of people in this world-- those
who can count in binary, and those who can not.
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Benjamin Esham wrote:
I have been trying to create this layout with CSS in XHTML:

a b

where a and b are both <div> elements with more content inside. I tried
setting `width: 48%' on both and `float: right' on b


Float lets things further down move _up_ to sit next to the floated element.
Float a left.

--
David Dorward http://dorward.me.uk/
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.