Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / November 2003



Tip: Looking for answers? Try searching our database.

Easy question about CSS positioning

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Benjamin Esham - 26 Nov 2003 00:46 GMT
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!

Signature

Benjamin D. Esham       {       http://bdesham.net
bdesham@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.

David Dorward - 26 Nov 2003 07:42 GMT
> 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.

Signature

David Dorward                                       http://dorward.me.uk/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.