Teccy's help me pretty please.

fisicx

Moderator
Sep 12, 2006
46,855
8
15,475
Aldershot
www.aerin.co.uk
Any ideas for code that could center it
Don't centre it. Left justified is far more effective.

But if you really want to centre the thing you need to wrap it in a DIV and set the margins to auto: http://theodorakis.net/tablecentertest.html

Better still, get rid of the table, you can do a far better job using pure CSS. It also gives you the chance to integrate lables and error checking.
 
  • Like
Reactions: cmcp and MASSEY
Upvote 0
Long live tables

<form>
<table ALIGN="center">
<tr>
<td>
Email:
</td>

<td>
Email:
</td>
<input type="text" size="30" name="email" value=""/>
</tr>
</table>
</form>

Just checked your site in IE6, it's all over the place, probably wise to check it at browsershots when you get a moment.
 
  • Like
Reactions: MASSEY
Upvote 0
Managed to do it forgot it was a table.

I think i will just leave it as a table thats not going to be a page that gets edited much.

I will check it at browsershots i never really paid attention to that.

Thanks.
 
Upvote 0
I will not say a word about using tables, but instead without looking at the site presume that you are using tables for tabular data and will advise you based on that.

find the place that your css goes ( either a separate css sheet or it could be above your html ) and put this in

table { margin: 0 auto; }

or it can be done inline for example here

<table width="200" border="1" style=" margin: 0 auto;">

but the first method within a separate css sheet is the most recommended
 
Last edited by a moderator:
Upvote 0
regardless on how you lay it out, i'd sort out that form and get it marked up correctly.

i keep meaning to start a blog about these things and never get round to it.

stay tuned!

I got it off fisicx a few months back. Whats wrong with it?

Remember the theme of that site is simple but effective :D.

If there is a few html areas that work but dont conform to the "done thing" it doesnt matter too much does it at the end of the day..... im sure you will disagree though lol
 
Upvote 0

fisicx

Moderator
Sep 12, 2006
46,855
8
15,475
Aldershot
www.aerin.co.uk
It forgotten all about that, it's quite an old version of the form. I'm on about Mark 5 now - much more robust, no tables and with it's own style sheet.
 
Upvote 0

Latest Articles

Join UK Business Forums for free business advice