jaguar11735 Posted April 12, 2006 Share Posted April 12, 2006 I am trying to remake a site using CSS instead of tables. The problem I am having is getting two div's (with the same class) to be side-by-side in a containing div. I have tried using float, however that prevents the two divs from centering themselves and also breaks the border on the containing div.. Any help would be appreciated.--steven Link to comment Share on other sites More sharing options...
scott100 Posted April 12, 2006 Share Posted April 12, 2006 if you add display:inline that will do it. <div style="display:inline"><div> Link to comment Share on other sites More sharing options...
jaguar11735 Posted April 13, 2006 Author Share Posted April 13, 2006 Yes, displaying it as an inline object does remove the line break. However it also removes the rest of the block elements that I need for this instance, such as a set width. Link to comment Share on other sites More sharing options...
Jonas Posted April 13, 2006 Share Posted April 13, 2006 Use display: inline-block; Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now