CSS

  • Thread starter pfldparkdistrict
  • Start date
P

pfldparkdistrict

I'm trying to center-align a table on a page. Do I use "align: center" when
setting table properties (doesn't work for me)? Also, I would like to have
the border setting to zero. I've tried "border-width: 0" , "border-style:
none" , "border: 0", but nothing seems to work. Does anyone have suggestions?
 
C

clintonG

<div align="center>
<table border="0">
<tr><td>Hello World</td></tr>
</table>
</div>

Note that 'old' syntax will still function but it has been deprecated. The
newer browsers are using CSS-2 and the prevailing design methodology
suggests avoiding the use of tables for layout unless used for tabular data.

My suggestion is you start doing tutorials at [1],[2] and use keywords from
those sites to search and find information from others.

--
<%= Clinton Gallagher
METROmilwaukee "Regional Information Services"
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/

[1] http://css.maxdesign.com.au/
[2] http://www.w3schools.com/


pfldparkdistrict said:
I'm trying to center-align a table on a page. Do I use "align: center" when
setting table properties (doesn't work for me)? Also, I would like to have
the border setting to zero. I've tried "border-width: 0" , "border-style:
none" , "border: 0", but nothing seems to work. Does anyone have
suggestions?
 
M

Murray

newer browsers are using CSS-2

Actually none of them are really using CSS-2, only tantalizingly small
pieces of it.

And pay no attention to those who say you must stop using tables. If a
table works, use it. Sooner or later you will find that for many things,
CSS works better - and at that time you can transition.

pfldparkdistrict:

To center a table and remove borders using CSS, you could do this (there
would be many ways) -

STYLESHEET
--------------------

table.special { width 750px; margin:0 auto; border:none; }

PAGE
---------

<table class="special"....


--
Murray

clintonG said:
<div align="center>
<table border="0">
<tr><td>Hello World</td></tr>
</table>
</div>

Note that 'old' syntax will still function but it has been deprecated. The
newer browsers are using CSS-2 and the prevailing design methodology
suggests avoiding the use of tables for layout unless used for tabular
data.

My suggestion is you start doing tutorials at [1],[2] and use keywords
from
those sites to search and find information from others.

--
<%= Clinton Gallagher
METROmilwaukee "Regional Information Services"
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/

[1] http://css.maxdesign.com.au/
[2] http://www.w3schools.com/


pfldparkdistrict said:
I'm trying to center-align a table on a page. Do I use "align: center" when
setting table properties (doesn't work for me)? Also, I would like to have
the border setting to zero. I've tried "border-width: 0" ,
"border-style:
none" , "border: 0", but nothing seems to work. Does anyone have
suggestions?
 
Top