Hi dudes!
i'm using a table (mail outer table) with 3 rows and 3 columns and all the page elements are contained within.
below is the html code given------ pl le me know if u know how to center the table vertically.table height is fixed at 350.
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http//www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="350" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFCC66">
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>
is it 2 difficult
Nobody has cn this or unable 2 do guys.
......................................................Pl try it out
how 2 center the table vertically
I messed around with this yesterday but had no luck. It only worked when I removed the doctype completely, which is a very bad thing. IE6 worked in quirksmode, but never anytime else. I have no more information on this right now.
how 2 center the table vertically
Create a full width, full height table with a single cell. Put your table in there. The td's default valign="middle" will center the content.
BTW, it's not nice to post the same question to multiple forums.
cheers,
gary.
Tx gary
D D Tx, Gary looks so simple ... now started thinking wy i didn't du tht way.................. but that is the way html things happen................but this doesn't work in mozilla and netscape as well.....
Re: Tx gary
<snip>.......but this doesn't work in mozilla and netscape as well.....
gary
how 2 center the table vertically
gary,
Using IE6, if I drag the top or bottom window by some degree, making the window smaller or larger, the vertical alignment will be lost. Then, if I maximize the window or drag the left or right pane in any direction, the alignment will be back. A screenshot will show how it breaks.
cheers,
andy
how 2 center the table vertically
If IE fails to redraw its window upon dragged resizing, it's just a shortcoming/feature* of the browser and has nothing to do with the code. As you note, resizing by the maximize/restore button (and by toggling fullscreen) does not screw with the layout. In those cases the entire window is redrawn.
* More and more I feel less and less concern about the failures of IE to render html4, css1, css2, and javascript correctly. It's as if IE users owned B&W TVs (tellies to you Brits out there). No matter how backward compatible a color signal is, their TVs will still just render in black and white.
cheers,
gary
how 2 center the table vertically
* More and more I feel less and less concern about the failures of IE to render html4, css1, css2, and javascript correctly.
Gary,
Instead of bashing IE and saying to hell with that browser, we should find a workaround for this. I think it's doing designers like ourselves a disservice to write off problems because of a personal disdain for IE's shortcomings. It seems like you are giving up on the solution, which means you are becoming part of the problem. I think you're too skilled to do that.
Andrew
how 2 center the table vertically
Certain shortcomings should be left naked and exposed. We shouldn't pander to every little foible that a browser has. This is a mistake, it leaves the impression that there is nothing wrong with it.
Companies like MS will just smirk saying "see there's nothing wrong with our fine browser"
We already spend an inordinate amount of effort in ensuring that pages look ok in IE lets not take it too far.
As I've said in the past, I think we already make the mistake of supporting far too many old , poor browsers if every designer/developer refused to cater for them and only wrote to strict CSS specs without any hacks then the browsers would be forced into improving (this is of course a pure flight of fancy).
Do the Yanks not use the word 'tellies' then Gary ? we do say TV as well also 'tube', 'goggle box', 'box'
Hugo.
how 2 center the table vertically
So, we should just leave this as it is? The way I see it, IE dominates the market (still), the above code doesn't vertically align as advertised due to a browser flaw in IE, and we're basically giving up. Where is the line? When do we say, "that's too far, I won't find a hack for it." New hacks rise from the ranks all the time. Why can't this one?
Andrew
how 2 center the table vertically
antibland:Why in hell shouldn't we bash a browser that has had three major revisions since css1 became official in 1996, and still doesn't have full support?
Why in hell shouldn't we bash a browser that's had two major revisions since css2 became official in 1998, and still doesn't have anywhere near full support?
Why in hell shouldn't we bash a browser that has had two major revisions since html4 was adopted in 1999, and still lacks critical support?
(If there are beeps above, it is not what you think, but aitch ee ell ell.)
But that's not even the genesis of my remark. The trigger had nothing to do with html or css, but with the apparent unwillingness to do what most other browsers do as a matter of course, and redraw the view on the fly. As I understand it, that's one reason the egregious 3px jog bug can break a layout that shouldn't break. Stupid.
Nor did I say that work arounds, hacks and dumbing down shouldn't be used to cause IE not to break things that shouldn't break. Breakage cannot be ignored. Small differences can.
If an amenity can be added to a page as rendered by a modern browser, I'm not concerned that stupid browsers don't render it. I'm not going to force a B&W TV to show color. Nor am I going to make folks with color TVs watch nothing but B&W.
Do the Yanks not use the word 'tellies' then Gary? we do say TV as well also 'tube', 'goggle box', 'box'
cheers,
gary
how 2 center the table vertically
antibland:Why in *beep* shouldn't we bash a browser that has had three major revisions since css1 became official in 1996, and still doesn't have full support?
Why in *beep* shouldn't we bash a browser that's had two major revisions since css2 became official in 1998, and still doesn't have anywhere near full support?
Why in *beep* shouldn't we bash a browser that has had two major revisions since html4 was adopted in 1999, and still lacks critical support?
You missed my point entirely. I wasn't saying not to bash IE. I was essentially saying that there comes a point when bashing it gets old. Gary, after all these posts, we know you don't like IE. None of us love it. I just think we can all be a bit overdramatic at times when we should just concentrate on a given solution. If a solution doesn't exist or cannot be spun from our hands, then so be it. Otherwise, let's just duck our heads and plow through the artillery of foolishness that is IE.
Andrew
how 2 center the table vertically
You missed my point entirely. I wasn't saying not to bash IE. I was essentially saying that there comes a point when bashing it gets old. Gary, after all these posts, we know you don't like IE. None of us love it. I just think we can all be a bit overdramatic at times when we should just concentrate on a given solution. If a solution doesn't exist or cannot be spun from our hands, then so be it. Otherwise, let's just duck our heads and plow through the artillery of foolishness that is IE.
AndrewHuh?
Instead of bashing IE and saying to *beep* with that browser, we should find a workaround for this. I think it's doing designers like ourselves a disservice to write off problems because of a personal disdain for IE's shortcomings. It seems like you are giving up on the solution, which means you are becoming part of the problem. I think you're too skilled to do that.
how 2 center the table vertically
You'd obviously rather play semantics that see my overall point. Bashing's ok to me if it's followed by helping. If you didn't get that out of my post, then enjoy your little victory and forget about this thread as I'm doing right now.
Andrew
how 2 center the table vertically
Hitler, N*zis.
how 2 center the table vertically
Hugo, sorry to have tired you out. Belive me, though, I wasn't writing to entertain anyone. You'd know if I was. Hopefully.
how 2 center the table vertically
It's ok, I wasn't looking to be entertained . Just bored.
Gary will understand the reference to Hitler and the N word.( used as a method of signalling the natural end to a thread )
Hugo.