html - my table size changes with content -
html - my table size changes with content -
i made 2 4 table in html in every td div. this:
<table id="buildingtable"> <tr> <td><div class="building"> test </div><td> <td><div class="building"> test </div><td> </tr> <tr> <td><div class="building"> test </div><td> <td><div class="building"> test </div><td> </tr> <tr> <td><div class="building"> test </div><td> <td><div class="building"> test </div><td> </tr> <tr> `<td><div class="building"> test </div><td> <td><div class="building"> test </div><td> </tr> </table> the thought set image , littlebit of text in every div table looks fine text, place image within div changes size of every first td in every tr. , changes first (so first vertical row) wich strange. css used table , divs:
#buildingtable{ height: 100%; width: 100%; margin-left: 1.8%; margin-top: -1.5%; } .building{ display:block; height: 50%; max-height: 50%; width:80%; max-width:80%; padding: 5% 7.5%; background: #aba000; color: #fff; border-radius: 5px 5px 5px 5px; -moz-border-radius: 5px 5px 5px 5px; -webkit-border-radius: 5px 5px 5px 5px; border: 8px #001db0; border-style: groove ridge ridge groove; }
i guess it's simple fix, you've placed divisions in wrong place.
instead of:
<td><div class="building"> test </div><td> why don't try:
<div class="building"><td> test <td></div> you need table adjusted width , not text.
html css html-table
Comments
Post a Comment