Shadowing Posted July 27, 2012 Share Posted July 27, 2012 (edited) 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 July 27, 2012 by Shadowing Link to comment Share on other sites More sharing options...
dsonesuk Posted July 27, 2012 Share Posted July 27, 2012 (edited) 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 July 27, 2012 by dsonesuk Link to comment Share on other sites More sharing options...
eTianbun Posted July 27, 2012 Share Posted July 27, 2012 Your code should have worked that way, but your first <div> is not closed properly! Link to comment Share on other sites More sharing options...
Shadowing Posted July 28, 2012 Author Share Posted July 28, 2012 lol crap... cant believe i didnt notice that closing tag. geez. thanks guys 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