I am looking for a solution (preferably in css or html) to make it so that my table located in the div container compresses it <td> so that they stay inside the div container when resizing the browser, http: //lux.physics. ucdavis.edu/public/new_website/kkdijlsis2311/ex.html Note that when you resize the browser, the contents of the cells change size, but I want the size of the cells to be fixed and the columns to be changed. Therefore, if the browser was small, the table would be something like 2 columns, not 6. Example html code:
<div id="imageline"> <table width="100%"> <tr> <td>Stuff, maybe an image</td> <td>Stuff, maybe an image</td> <td>Stuff, maybe an image</td> <td>Stuff, maybe an image</td> <td>Stuff, maybe an image</td> <td>Stuff, maybe an image</td> </tr> <tr> <td>Stuff, maybe an image</td> <td>Stuff, maybe an image</td> <td>Stuff, maybe an image</td> </tr> </table> </div>
Css Code:
#imageline { width: 100%; position:relative; }
I feel this can be solved with simple css. I continue to try different combinations, where the width: 100% goes, but everything fails. Any insight is greatly appreciated.
source share