...

View Full Version : vertical & horizental center at a same time.



joonstar
02-15-2005, 01:07 AM
I like to display the phrase " middle & center" in the vertically middle place and horizently center place at a same time.

So I made the following code.



<center>
<table width=100% height=100%>

<tr>
<td valign=middle align=center>

middle & center

</td>
</tr>

<table>
</center>


It works fine but the scroll bar is shown on the right.


I like to display the phrase "middle & center" in the vertically middle place & horizently center place at a sam time without any scroll bars.

Thanks in Advance

Blind Zero
02-15-2005, 01:55 AM
I like to display the phrase " middle & center" in the vertically middle place and horizently center place at a same time.

So I made the following code.



<center>
<table width=100% height=100%>

<tr>
<td valign=middle align=center>

middle & center

</td>
</tr>

<table>
</center>


It works fine but the scroll bar is shown on the right.


I like to display the phrase "middle & center" in the vertically middle place & horizently center place at a sam time without any scroll bars.

Thanks in Advance

Well I see a few issues. As far as I know there is no <center> tag. And you don't have a "/" to close off your table.

harbingerOTV
02-15-2005, 01:57 AM
Here (http://home.earthlink.net/~harbingerofthevoid/center1.html)

Table-less.

Works in IE6 and MOZ/FF

to get rid of the side scroll bar I used:

<style type="text/css">
body {overflow: hidden;}
</style>

Jalenack
02-15-2005, 01:59 AM
Ack!

There is a <center> tag, but its old and deprecated and bad. You can achieve everything with this simple code:

<div id="middle">
Middle and center
</div>

and CSS:

#middle {
text-align: center;
line-spacing: 400px;
height: 400px;
}

You can adjust the 400px to whatever you want, if you want relative units (percents) that may be more complicated.

Blind Zero
02-15-2005, 02:02 AM
Ack!

There is a <center> tag, but its old and deprecated and bad. You can achieve everything with this simple code:




Well, thank you for posting that bit of wisdom, I had no idea.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum