HighDots Forums  

Re: really easy tables question

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: really easy tables question in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David Dorward
 
Posts: n/a

Default Re: really easy tables question - 10-08-2006 , 05:10 AM






Michael wrote:

Quote:
I'm trying to use a table and format it with CSS, but I cant get it to
render with a border. I know this is really easy, but I can't see what I
have wrong and when I search for tables and CSS I just get lots of stuff
about using tables for layout etc.
There's nothing special about tables when it comes to borders in CSS.

Quote:
What I have is:
table {border: 2px;
So, that would be:

border-width: 2px;
border-style: none;

then?

(and don't forget the border-color).

Quote:
font-size: 16pt;
Point units considered harmful on screen:
http://css-discuss.incutio.com/?page=UsingPoints

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: really easy tables question - 10-08-2006 , 12:15 PM






Scripsit David Dorward:

Quote:
There's nothing special about tables when it comes to borders in CSS.
Actually there's quite a lot special, like border-collapse. But for the
border around a table itself, there's nothing different from the general
border concept in CSS.

What puzzles people who move from presentational HTML to using CSS is that
when you set a border for a table, you only set a border for the table
element as a whole. That's really the "nothing special" thing in CSS terms,
but it differs essentially from the effect of, say, <table border="2">.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Reply With Quote
  #3  
Old   
Michael
 
Posts: n/a

Default Re: really easy tables question - 10-09-2006 , 11:29 PM




"David Dorward" <dorward (AT) yahoo (DOT) com> wrote

Quote:
Michael wrote:

I'm trying to use a table and format it with CSS, but I cant get it to
render with a border. I know this is really easy, but I can't see what I
have wrong and when I search for tables and CSS I just get lots of stuff
about using tables for layout etc.

There's nothing special about tables when it comes to borders in CSS.

What I have is:
table {border: 2px;

So, that would be:

border-width: 2px;
border-style: none;

then?

(and don't forget the border-color).

font-size: 16pt;

Point units considered harmful on screen:
http://css-discuss.incutio.com/?page=UsingPoints

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/
Home is where the ~/.bashrc is

ahhhhhh! I knew it was something stupid.
Thanks for that

Michael




Reply With Quote
  #4  
Old   
Michael
 
Posts: n/a

Default Re: really easy tables question - 10-10-2006 , 10:39 PM




"Michael" <michael5139 (AT) yahoo (DOT) com> wrote

Quote:
"David Dorward" <dorward (AT) yahoo (DOT) com> wrote in message
news:egafbj$ggk$1$8302bc10 (AT) news (DOT) demon.co.uk...
Michael wrote:

I'm trying to use a table and format it with CSS, but I cant get it to
render with a border. I know this is really easy, but I can't see what I
have wrong and when I search for tables and CSS I just get lots of stuff
about using tables for layout etc.

There's nothing special about tables when it comes to borders in CSS.

What I have is:
table {border: 2px;

So, that would be:

border-width: 2px;
border-style: none;

then?

(and don't forget the border-color).

font-size: 16pt;

Point units considered harmful on screen:
http://css-discuss.incutio.com/?page=UsingPoints

--
David Dorward <http://blog.dorward.me.uk/
http://dorward.me.uk/
Home is where the ~/.bashrc is


ahhhhhh! I knew it was something stupid.
Thanks for that

Michael


Hmmmm.....

Now I have:

table {position: absolute;
top: 150px;
left: 150px;
border-width: 2px;
border-style: none;
font-size: 16pt;
}

I know the page is using the stylesheet because if I change the font-size it
changes, but I still have no border........

Thanks for your help

Regards

Michael




Reply With Quote
  #5  
Old   
David Stone
 
Posts: n/a

Default Re: really easy tables question - 10-11-2006 , 07:43 AM



In article
<452c5961$0$1471$5a62ac22 (AT) per-qv1-newsreader-01 (DOT) iinet.net.au>,
"Michael" <michael5139 (AT) yahoo (DOT) com> wrote:

Quote:
"Michael" <michael5139 (AT) yahoo (DOT) com> wrote in message
news:452b13a6$0$1467$5a62ac22 (AT) per-qv1-newsreader-01 (DOT) iinet.net.au...

"David Dorward" <dorward (AT) yahoo (DOT) com> wrote in message
news:egafbj$ggk$1$8302bc10 (AT) news (DOT) demon.co.uk...
Michael wrote:

I'm trying to use a table and format it with CSS, but I cant get it to
render with a border. I know this is really easy, but I can't see what I
have wrong and when I search for tables and CSS I just get lots of stuff
about using tables for layout etc.

There's nothing special about tables when it comes to borders in CSS.

What I have is:
table {border: 2px;

So, that would be:

border-width: 2px;
border-style: none;

then?

(and don't forget the border-color).

font-size: 16pt;

Point units considered harmful on screen:
http://css-discuss.incutio.com/?page=UsingPoints

--
David Dorward <http://blog.dorward.me.uk/
http://dorward.me.uk/
Home is where the ~/.bashrc is


ahhhhhh! I knew it was something stupid.
Thanks for that

Michael



Hmmmm.....

Now I have:

table {position: absolute;
top: 150px;
left: 150px;
border-width: 2px;
border-style: none;
font-size: 16pt;
}

I know the page is using the stylesheet because if I change the font-size it
changes, but I still have no border........
It helps to consult the CSS specs for border-style:

none
No border. This value forces the computed value of ¹border-width¹
to be ¹0¹.
hidden
Same as ¹none¹, except in terms of border conflict resolution [p.
264] for table elements [p. 245] .
dotted
The border is a series of dots.
dashed
The border is a series of short line segments.
solid
The border is a single line segment.

http://www.w3.org/TR/REC-CSS2, for future reference!


Reply With Quote
  #6  
Old   
David Dorward
 
Posts: n/a

Default Re: really easy tables question - 10-11-2006 , 01:18 PM



Michael wrote:

Quote:
So, that would be:
border-width: 2px;
border-style: none;
then?

border-style: none;
So now you're setting it to none explicitly, instead of having none because
its the default. None is, however, still none.

Quote:
(and don't forget the border-color).
You're still forgetting the border colour.

Quote:
Point units considered harmful on screen:
http://css-discuss.incutio.com/?page=UsingPoints

font-size: 16pt;
Point units are still considered harmfil, avoid them.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.