Jump to content

two div's inside a td


Shadowing

Recommended Posts

Hey guys I dont know why but for some reason i cant keep these two div's to be on the same line inside this td.Ive done this before using float left on both the div but its not working.god rid of all code except whats important

<tr><td colspan="2"> <div style="float:left;">Free Planets:<div>  <div style="float:left;">Star Distance: <input id="star_distance" type="text" name="star_distance"maxlength="4" size="4" value="distance"/></div>  </td></tr>

Edited by Shadowing
Link to comment
Share on other sites

Remove float from the bottom element, the non floated element below will merge, to float elements side by side they will have to be a width that will allow both to fit the parent element total width, and remember to allow for padding etc. Edit: wrong way round

Edited by dsonesuk
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
×
×
  • Create New...