Centering an HTML Element on the Web Page

Using Firefox and Firebug, you can inspect a part of a web page that you are having trouble centering horizontally, and, in this demonstration, see how to do that using cascading style sheets. Despite this demonstration using this for an image (IMG HTML tag), this strategy works for any kind of web page content HTML that you’d like to center as you can stuff a DIV with anything you would like displayed.

6 minutes, 25 seconds

How to keep table cell width fixed while keeping cell height dynamic?

Below this text is the code for my simple little table for the new newsletter format. The problem I am currently having is the cells expand width wise, and this causes misalignment of the table cells as the reader scrolls down the issue of the newsletter.ย  I DO need variable height…itโ€™s the width of each cell that needs to be equal…I donโ€™t know what to add to accomplish that though =-/

 

Here is the code as it is now:

[box]

</table>

<br />

<table border=”1″ bordercolor=”#000000″ cellpadding=”0″ cellspacing=”0″ style=”background-color: rgb(255, 255, 255);” width=”550″>

<tbody>

<tr>

<td>

<div id=”store_name” style=”text-align: center;” valign=”bottom”>

<br />

<br />

<span style=”text-decoration: none;”><img alt=”” border=”0″ height=”34″ src=”https://us1.admin.mailchimp.com/_ssl/proxy.php?u=http%3A%2F%2Fgallery.mailchimp.com%2Fbdb5104c7898e4dd34a7d2c0e%2Fimages%2FNLProductButton.5.gif” width=”117″ /></span></div>

</td>

<td>

<div id=”store_name” style=”text-align: center;” valign=”bottom”>

<br />

<br />

<span style=”text-decoration: none;”><img alt=”” border=”0″ height=”34″ src=”https://us1.admin.mailchimp.com/_ssl/proxy.php?u=http%3A%2F%2Fgallery.mailchimp.com%2Fbdb5104c7898e4dd34a7d2c0e%2Fimages%2FNLProductButton.6.gif” width=”117″ /></span></div>

</td>

<td>

<div id=”store_name” style=”text-align: center;” valign=”bottom”>

<br />

<br />

<span style=”text-decoration: none;”><img alt=”” border=”0″ height=”34″ src=”https://us1.admin.mailchimp.com/_ssl/proxy.php?u=http%3A%2F%2Fgallery.mailchimp.com%2Fbdb5104c7898e4dd34a7d2c0e%2Fimages%2FNLProductButton.5.gif” width=”117″ /></span></div>

</td>

</tr>

</tbody>

</table>

<br />

[/box]