Reputation: 367
<body>
<div id="container">
<div id="body">
<center>
<table width="650" border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td align="center" height="40"><img src="logo.jpg" alt=" Store" width="100" height="30"></td>
</tr>
<tr>
<td height="20" align="center" class="intro"> <a href="">online store</a> | <a href="">main website</a></td>
</tr>
<tr>
<td height="352" align="center"><img src="str.jpg" width="500" height="500"></td>
</tr>
</tbody>
</table>
</center>
</div>
<!-- Ola sto span class mporoun na xwresoun? -->
<div id="footer" class="intro"><span style class="bottom"> email | the store | address | tel </div>
</div>
</body>
The table is now in the center of the browser. The thing I wanna change is not to start from the very top, I want the table to be a little lower, for example 30 pixels from the top.
Ok well I made the whole table go lower by adding <br>
before the <table>
tag but this is ridiculous. What else can I do?
Upvotes: 0
Views: 9829
Reputation: 17364
Using <br>
is perfect way to lower the table down. Although you can do it with CSS styles which will give you more precise movement.I typically use padding
#mytable {
padding-top:30px;
}
Upvotes: 1
Reputation: 4001
You can put a margin on it with the style attribute:
<table width="650" border="0" cellspacing="0" cellpadding="5" style="margin-top: 100px;">
You could also use a percentage value, eg:
<table width="650" border="0" cellspacing="0" cellpadding="5" style="margin-top: 20%;">
Upvotes: 0