html - Auto align of a table in a page -
i helping friend website (url: http://mk7vrlist.altervista.org/databases/test.html). used table design , put each single inputbox in <td> .. </td>
. used javascript save datas , php upload them on server. problem when user open page, table not aligned according background.
as can see, table insede black rectangle, other screen sizes looking not same. solve problem used following code:
css:
body { background-image:url('pictures/bgframe.png'); background-repeat:no-repeat; background-attachment:fixed; background-position:center; } input{ text-align:center; }
in table used code:
<table id="tab" border="0" style="width:1200px;" align="center"> <tr> ... </tr> </table>
this code not working because smaller screen, align of table not same.can me? if want, here there entire code.
you should try relative css property, like: width:100%;
(instead of hard-coded value in px) in order scale properly. also, might useful explicitly set html5 <body>
css properties: padding:0;margin:0;
Comments
Post a Comment