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

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

td valign=middle - issue...

Reply to Message Icon

Name: timothy_aah
Date: February 25, 2008 at 06:27:50 Pacific
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



Sponsored Link
Ads by Google

Response Number 1
Name: nascent (by mboto)
Date: February 29, 2008 at 17:43:55 Pacific
Reply:

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


0

Response Number 2
Name: timothy_aah
Date: March 2, 2008 at 04:24:09 Pacific
Reply:

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

Timothy


0

Response Number 3
Name: nascent (by mboto)
Date: March 3, 2008 at 12:55:39 Pacific
Reply:

Just found this and thought it might be of use

http://www.mycelly.com/


0

Response Number 4
Name: timothy_aah
Date: March 9, 2008 at 15:28:14 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: td valign=middle - issue...

Background graphics www.computing.net/answers/webdevel/background-graphics/1629.html

valign=top not working www.computing.net/answers/webdevel/valigntop-not-working/2626.html

Javascript Question www.computing.net/answers/webdevel/javascript-question/1564.html