Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Center website

Reply
Thread Tools

Center website

 
 
Hugo
Guest
Posts: n/a
 
      06-04-2008
Hey guys,

I want to center a table that is bigger than my screen resolution. So
in other words the middle of the table has to be in the middle of my
screen and on any other resolution it has to be the middle. How is
this possible?

<div align="center"> does not work
the whole <table><tr><td align="center"> ... does also not work

Any ideas? Thanks
 
Reply With Quote
 
 
 
 
Roderik
Guest
Posts: n/a
 
      06-04-2008
Hugo schreef:
> Hey guys,
>
> I want to center a table that is bigger than my screen resolution. So
> in other words the middle of the table has to be in the middle of my
> screen and on any other resolution it has to be the middle. How is
> this possible?
>
> <div align="center"> does not work
> the whole <table><tr><td align="center"> ... does also not work
>
> Any ideas? Thanks


If it has to be centered when the table is wider than your browser
viewport you need some javascript to scroll to the right position
(consider asking in comp.lang.javascript).

--
http://www.archytas.nl/
webdesign, internet applicaties, internetgestuurde elektronica
 
Reply With Quote
 
 
 
 
richard
Guest
Posts: n/a
 
      06-05-2008
On Wed, 4 Jun 2008 11:45:16 -0700 (PDT), Hugo
<(E-Mail Removed)> wrote:

>Hey guys,
>
>I want to center a table that is bigger than my screen resolution. So
>in other words the middle of the table has to be in the middle of my
>screen and on any other resolution it has to be the middle. How is
>this possible?
>
><div align="center">


This tells the content of the division to be centered.
It should read <div style="align:center;">


> does not work
>the whole <table><tr><td align="center"> ... does also not work


Again, the content of the data cell is centered, not the table.

You might want to try <center><table></table></center>
You should also learn the proper methods to code using CSS.


>
>Any ideas? Thanks

 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      06-05-2008
Hugo wrote:

> I want to center a table that is bigger than my screen resolution. So
> in other words the middle of the table has to be in the middle of my
> screen and on any other resolution it has to be the middle. How is
> this possible?


What's in this table?

I do not think what you describe is possible. To do so, would require a
horizontal scrollbar to "start in the middle." And hat will you do for
me? My monitor is 1680 pixels wide, but my browser window is probably
750-800 pixels.

Use a flexible design instead.

--
-bts
-Friends don't let friends drive Windows
 
Reply With Quote
 
Travis Newbury
Guest
Posts: n/a
 
      06-05-2008
On Jun 4, 2:45 pm, Hugo <(E-Mail Removed)> wrote:
> <div align="center"> does not work
> the whole <table><tr><td align="center"> ... does also not work
> Any ideas? Thanks


What are you really trying to do? Having a table that is larger than
the "screen resolution" (or browser window) and centering it will mean
that you want the use to scroll left and right. My guess is that
rather than scroll left and right, they will just look at you as
incompetent and go elsewhere.

 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      06-05-2008
Stiffy wrote:

> Well starch my britches and call me "Stiffy", I agree with Beau for a
> change!


Good morning, Stiffy.

--
-bts
-Friends don't let friends drive Windows
 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      06-05-2008
On Thu, 5 Jun 2008 03:07:11 +0000 (UTC), Neredbojias
<me@http://www.neredbojias.net/_eml/fliam.php> wrote:

>On 04 Jun 2008, richard <(E-Mail Removed)> wrote:
>
>> On Wed, 4 Jun 2008 11:45:16 -0700 (PDT), Hugo
>> <(E-Mail Removed)> wrote:
>>
>>>Hey guys,
>>>
>>>I want to center a table that is bigger than my screen resolution. So
>>>in other words the middle of the table has to be in the middle of my
>>>screen and on any other resolution it has to be the middle. How is
>>>this possible?
>>>
>>><div align="center">

>>
>> This tells the content of the division to be centered.
>> It should read <div style="align:center;">

>
>I think you meant <div style="text-align:center;">
>



I was showing that his coding was in error and how to correct it.
Align and text-align are two different things.
 
Reply With Quote
 
Steve Pugh
Guest
Posts: n/a
 
      06-05-2008
On Jun 5, 1:24*pm, richard <(E-Mail Removed)> wrote:
> On Thu, 5 Jun 2008 03:07:11 +0000 (UTC), Neredbojias
> <me@http://www.neredbojias.net/_eml/fliam.php> wrote:
> >On 04 Jun 2008, richard <(E-Mail Removed)> wrote:

>
> >> On Wed, 4 Jun 2008 11:45:16 -0700 (PDT), Hugo
> >> <(E-Mail Removed)> wrote:


> >>><div align="center">

>
> >> This tells the content of the division to be centered.
> >> It should read <div style="align:center;">

>
> >I think you meant <div style="text-align:center;">

>
> I was showing that his coding was in error and how to correct it.


But your correction was a bigger error than his original. At least his
was valid HTML, your's was just made up rubbish.

> Align and text-align are two different things.


There are indeed. One of them is an HTML attribiute and one of them is
a CSS property.

There is no align property in CSS (see http://www.w3.org/TR/CSS21/propidx.html)
so style="align: center" is nonsense.

To align the text contents of a block use text-align: center; To align
the block itself use margin-left: auto; margin-right: auto;
The HTML align="center" does both and a bit more (it also aligns any
child blocks) and has no single equivalent in CSS.

Steve
 
Reply With Quote
 
Els
Guest
Posts: n/a
 
      06-05-2008
richard wrote:

> On Thu, 5 Jun 2008 03:07:11 +0000 (UTC), Neredbojias
> <me@http://www.neredbojias.net/_eml/fliam.php> wrote:
>
>>On 04 Jun 2008, richard <(E-Mail Removed)> wrote:
>>
>>> It should read <div style="align:center;">

>>
>> I think you meant <div style="text-align:center;">

>
> I was showing that his coding was in error and how to correct it.


In order to show people how to correct things, it does help to show
them correct examples.

> Align and text-align are two different things.


You are correct of course, as the text-align property exists in CSS,
and the align property doesn't. Entirely different things indeed

--
Els http://locusmeus.com/
 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      06-05-2008
On Thu, 5 Jun 2008 15:07:14 +0200, Els <(E-Mail Removed)> wrote:

>richard wrote:
>
>> On Thu, 5 Jun 2008 03:07:11 +0000 (UTC), Neredbojias
>> <me@http://www.neredbojias.net/_eml/fliam.php> wrote:
>>
>>>On 04 Jun 2008, richard <(E-Mail Removed)> wrote:
>>>
>>>> It should read <div style="align:center;">
>>>
>>> I think you meant <div style="text-align:center;">

>>
>> I was showing that his coding was in error and how to correct it.

>
>In order to show people how to correct things, it does help to show
>them correct examples.
>
>> Align and text-align are two different things.

>
>You are correct of course, as the text-align property exists in CSS,
>and the align property doesn't. Entirely different things indeed



I was attempting to point out why his method was failing and that he
should learn more about how to correct it himself.
Trying to point out that table coding and division coding have
different conventions. As he was failing to understand how and when to
use the proper coding to achieve what he wanted.
Even though what he really wants to have happen, ain't gonna happen.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Training Center Website Alex MCSE 0 02-24-2009 05:59 PM
setting up website inside a website sck10 ASP .Net 1 04-13-2006 09:18 PM
Website on a website. Shawn ASP .Net 3 01-15-2006 04:58 AM
deploying website or copying website? Flip ASP .Net 1 11-22-2005 06:25 PM
Naming of core NASA center with the words "Mission Control Center" & mass use of religious anthem sounding word "Mission" in Context of Space Exploration & the Moon Landing Hoax moonlandinghoaxreligious@yahoo.com Digital Photography 0 09-27-2005 08:28 PM



Advertisments