html - Float an element to the right within containing parent with variable width in IE<=7 -
i have container-div no set width, contains table of variable width, , button below table. i'd button float on right right edge lines right edge of table. doing following seems work fine in browsers ie<=7. how done correctly?
<head> <style> #tablecontainer { float: left; } #btn { float: right; } </style> </head> <body> <div id="tablecontainer"> <table> <tr> <td>a b c</td> <td>a b c</td> <td>a b c</td> <td>a b c</td> </tr> </table> <button id="btn">buttontext</button> </div> </body> </html>
here's illustration of want:
__________________ | | | table | |________________| |btn| ‾‾‾‾‾
can take button out of div? should solve problem.
else, add float:left
on #tablecontainer table
(not recommended)
you wrap table div, , float div left
also, have move button before table
Comments
Post a Comment