Can anyone tell me how to get IE5 and 6 to 'middle' text in a table cell?
Netscape happily takes valign in the page or stylesheet but IE refuses.
I've attached some sample html...
Many thanks.
www.bricksandbrass.co.uk
Can anyone tell me how to get IE5 and 6 to 'middle' text in a table cell?
Netscape happily takes valign in the page or stylesheet but IE refuses.
I've attached some sample html...
Many thanks.
www.bricksandbrass.co.uk
Can anyone tell me how to get IE5 and 6 to 'middle' text in a table cell?
Netscape happily takes valign in the page or stylesheet but IE refuses.
I've attached some sample html...
Many thanks.
www.bricksandbrass.co.uk
Try this.
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr valign="middle">
<td bgcolor="#00FF00" width="48%" height="10">
<p align="center">Heading 1</td>
<td width="2%" height="10"></td>
<td bgcolor="#00FF00" width="50%" height="10">
<p align="center">Heading 2</td>
</tr>
</table>
</body>
</html
It looks a doddle; I must have a closer look to see what was going wrong.
Very many thanks...
www.bricksandbrass.co.uk
I was using H1 (with classes from a stylesheet). The vertical alignment in IE is wrong.
If instead you use P, with a style to replicate the format of the heading tag, then all is hunky dory.
Sometimes you just want to scream and ....
Thanks again, Mike, for giving me the clue. [img]/infopop/emoticons/icon_rolleyes.gif[/img]
www.bricksandbrass.co.uk
Glad it worked out Simon. Of course, the downside of using <p> instead of <hx> is that search engines don't give paragraph text as much weight as heading tags.
You can get around this by adding styles to your heading tags - padding-top or bottom seems to help.
Good luck!
cfn ... Jen
Jen Worden
Web Developer
www.meadoworks.com
I've just rebuilt the whole site!!!! That search engine thing is a real *****; inevitably the heading is rather significant.
Vertical alignment in a stylesheet doesn't work on Heading tags, so I'll have to try your trick.
Thanks...
www.bricksandbrass.co.uk
Tried that. Padding won't work because then Netscape renders it all wrong.
Is the only solution to have browser-specific formatting?!!
Or can I get round the search engine problem another way?
www.bricksandbrass.co.uk
Doh! I shoulda paid more attention!
Try "vertical-align: middle;" for your heading tags - I tested on Netscape 4 and IE 5 and they both worked.
Hope that does it for you, Simon.
cfn ... Jen
Jen Worden
Web Developer
www.meadoworks.com
You are assigning the valign propety to the <tr> tag - you should be assigning it to the <td> instead.
<td valign="middle">
Ed
Bookmarks