to the middle of the browser...

windows

Guest
how to push this page to the middle of the browser? i try to use alot of code...and it cannot seem to work...pls help me...<br />
<br />
<!-- m --><a class="postlink" href="http://www.tanfwc.net/index2.html">http://www.tanfwc.net/index2.html</a><!-- m --><!--content-->do you mean how to vertically center it?<br />
if so, check this (<!-- m --><a class="postlink" href="http://www.wpdfd.com/editorial/thebox/deadcentre3.html">http://www.wpdfd.com/editorial/thebox/deadcentre3.html</a><!-- m -->) out.<!--content-->cannot really get it to center...view the page again...<!--content-->why do you have a <tr> in there?<br />
Thats not tabular, and there's not even a <table> or a <td> to accompany it...<!--content-->http://forums.webdeveloper.com/showthread.php?s=&threadid=31841'<br />
I just posted about centering here<br />
<!-- m --><a class="postlink" href="http://knights.europe.webmatrixhosting.net/hybrid.html">http://knights.europe.webmatrixhosting.net/hybrid.html</a><!-- m --> example, this is with a hybrid table/css layout. Here is how one might center just a div <!-- m --><a class="postlink" href="http://bluerobot.com/web/css/center1.html">http://bluerobot.com/web/css/center1.html</a><!-- m --> exactly the same as what I did with a table though.<!--content-->Originally posted by PeOfEo <br />
<!-- m --><a class="postlink" href="http://forums.webdeveloper.com/showthread.php?s=&threadid=31841'">http://forums.webdeveloper.com/showthre ... did=31841'</a><!-- m --><br />
I just posted about centering here<br />
<!-- m --><a class="postlink" href="http://knights.europe.webmatrixhosting.net/hybrid.html">http://knights.europe.webmatrixhosting.net/hybrid.html</a><!-- m --> example, this is with a hybrid table/css layout. Here is how one might center just a div <!-- m --><a class="postlink" href="http://bluerobot.com/web/css/center1.html">http://bluerobot.com/web/css/center1.html</a><!-- m --> exactly the same as what I did with a table though. <br />
<br />
Peo, :mad: don't fail on us now..<!--content-->Originally posted by omega <br />
Peo, :mad: don't fail on us now.. ??? Table Css hybrid layouts are not a bad thing even though I do not prefer to use one myself. If they are done right they will still be accessable and standards complient. Some people *cough* buntine *cough* just do not want to give up their tables though.<!--content-->Yes. As for table/css hybrids.. I used to think they were OK, but I remember on my first post here a lot of people here trashed them.. and all my "best" layouts are 100% CSS so... (:\)<!--content-->Originally posted by samij586 <br />
why do you have a <tr> in there?<br />
Thats not tabular, and there's not even a <table> or a <td> to accompany it... <br />
<br />
still unable to do it...can guide me?<!--content-->Add<br />
<br />
position: absolute;<br />
top: 50%;<br />
left: 50%;<br />
margin-left: -275px;<br />
margin-top: -100px;<br />
<br />
To the <br />
#container styles. I roughly guessed on the -100px for the top, since I don't know how tall exactly the <div> is. What that does is position the <div> 50% from the left of the screen and 50% from the top. Then it uses negative left and top margins, which are half of the <div>'s width and height, respectively, to move the <div> so it's exactly centered on the page. Refer to the link Sam posted for more info.<!--content-->Dead Centre (<!-- m --><a class="postlink" href="http://www.wpdfd.com/editorial/thebox/deadcentre4.html">http://www.wpdfd.com/editorial/thebox/deadcentre4.html</a><!-- m -->)<!--content-->
 
Back
Top