Computing.Net > Forums > Web Development > td valign=middle - issue...

td valign=middle - issue...

Reply to Message Icon

Original Message
Name: timothy_aah
Date: February 25, 2008 at 06:27:50 Pacific
Subject: td valign=middle - issue...
OS: xp/vista
CPU/Ram: AMD X2 4200/2GB
Comment:

hi,

I'm building a website and I'd like it to be centered in the middle of the window.
so I put the entire content in a table with one cell and I set that to align its content to the middle (<td valign="middle" align="center">)
this does the trick in firefox, but IE refuses to do it -_-'
horizontal alignment works, vertical alignment doesn't...
I've been trying lots of stuff, but none seem to work, and it shouldn't have to be complicated...
any ideas?
thx


Report Offensive Message For Removal

Response Number 1
Name: nascent (by mboto)
Date: February 29, 2008 at 17:43:55 Pacific
Subject: td valign=middle - issue...
Reply: (edit)

Hi,

Not used tables in a while, so can't remember all the situations IE falls over with tables. The main reason i moved to CSS and divs.

If you wanted to try using CSS, a simple way would be to use this code. Copy and paste into Notepad or Notepad++ and save it as test.html or something with .html file extension.

<html>
<head>
<style type="text/css">
==replace this one line with explanation below 1==
body {
text-align: center;
}
#wrapper{
width: 720px;
margin: 0 auto;
text-align: left;
border: 2px solid;
}
==replace this one line with explanation below 2==
</style>
</head>

<body>
<div id="wrapper">

some text here</p>
</div>
</body>
</html>

Annoyingly Computing.net wont allow all code you could add a
1.
left arrow (above comma), exclamation, dash, dash (next to plus/equals)
2.
dash, dash, exclamation, right box arrow (above full stop, or if your american a period.... which from an englishman's vocabulary is just really really wrong, there arn't many things i'd like to replace with a period!! :D )


The text align stuff in body and wrapper is for IE5 and IE6, as they dont work too well. I hate M$ they make so much work.


The border part is just to show you that it is centered. Take this out and make it your own. Its not to hard to find some tags and get going. If you wanted to progress try using the CSS keyword position with values fixed, relative, and float (float can be tricky though leave this when your not on a deadline to get this finished).

Anyway, sorry i can't help you with tables but they really have gone the way of Dodo for precisely the reason you've posted here. They used to drive me up the wall too, best to just blame M$ and move on :-P

Hope this helps,
Adam


Report Offensive Follow Up For Removal

Response Number 2
Name: timothy_aah
Date: March 2, 2008 at 04:24:09 Pacific
Subject: td valign=middle - issue...
Reply: (edit)

haha :D I do blame M$ xD
anyways, thx for the pointers, will try them asap!

Timothy


Report Offensive Follow Up For Removal

Response Number 3
Name: nascent (by mboto)
Date: March 3, 2008 at 12:55:39 Pacific
Subject: td valign=middle - issue...
Reply: (edit)

Just found this and thought it might be of use

http://www.mycelly.com/


Report Offensive Follow Up For Removal

Response Number 4
Name: timothy_aah
Date: March 9, 2008 at 15:28:14 Pacific
Subject: td valign=middle - issue...
Reply: (edit)

as a matter of fact that IS useful :D
thx a lot^^


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: td valign=middle - issue...

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software