Jump to content

Floating Divs


beennn
 Share

Recommended Posts

I'm having some trouble getting multiple divs floating next to each other. Here's what I have so far:

.content { width:auto;max-width:100%;float:left;padding:15px;}

which gives:float1.png However I'm aiming for:float2.png Any ideas?

Edited by beennn
Link to comment
Share on other sites

Depends on what you're using for content. This works:

<!DOCTYPE html><html><head><style>.content {width:auto;max-width:100%;float:left;padding:15px;background-color:yellow;}</style></head><body><div class="content"><p>Some text.</p></div><div class="content"><p>Some text</p></div></body></html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...