17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1276 Views |
-
Problems with centering an invisible table

11 May 2009 at 9:29pm
Hey guys,
currently I am trying to center an invisible table. The table alignment is set to "center", but in this case the table is still shown on the left.
This is my source code:<table border="0" align="center">
<tbody>
<tr>
<td style="text-align: center;">
<div class="image center" style="width: 360px; text-align: center;"><img src="assets/Uploads/schlaf1.jpg?r=95536" alt="" width="360" height="270" /></div>
Im Schlafzimmer befindet sich ein Doppelbett<br /> (Bei Bedarf ist eine Aufbettung oder Baby-Bett vorhanden)</td>
</tr>
</tbody>
</table>
Is there any solution?Thanks in advance
Greetings from Karlsruhe, Germany
Marco -
Re: Problems with centering an invisible table

12 May 2009 at 11:34pm
Your align "instructions" effect the contents of the table, not the table itself.
To center your table I'd try something along these lines:<div style="text-align:center;">
<table>
... table content ...
</table>
</div>I hope your code doesn't look exactly like the one you posted though. Because in that case you won't need a table at all
-
Re: Problems with centering an invisible table

13 May 2009 at 7:05pm
Hey guys,
@banal: thanks for your advice.
I tried different options, the solution I have found is the following:
<div style="text-align: center">
<div class="image center" style="margin: 0px auto; width: 360px; text-align: center;"><img src="assets/Uploads/_resampled/ResizedImage360270-schlaf1.jpg" alt="" width="360" height="270" /></div>
Im Schlafzimmer befindet sich ein Doppelbett<br /> (Bei Bedarf ist eine Aufbettung oder Baby-Bett vorhanden)</div>
The crux ismargin: 0px auto;
which aligns the image at the center.Kind Regards
Marco
| 1276 Views | ||
|
Page:
1
|
Go to Top |


