Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Style for table

Reply
Thread Tools

Style for table

 
 
Tora
Guest
Posts: n/a
 
      09-08-2003
I have one html-file & one css-file.
All works fine with the styles except for the element TABLE

When i write in the html-file

TABLE border="1" frame="box"

all works fine, but when i do the following in the html-file

TABLE class="mystyle"

and then in the css

TABLE.mystyle
{ border: 1;
frame: box;
}

The table stays without border and no frame


How come ?



 
Reply With Quote
 
 
 
 
Toby A Inkster
Guest
Posts: n/a
 
      09-08-2003
Tora wrote:

> TABLE.mystyle
> { border: 1;
> frame: box;
> }


Perhaps:

table.mystyle {
border: 1px dotted blue;
}

or

table.mystyle {
border: 1px solid red;
}

or even

table.mystyle, table.mystyle td, table.mystyle th {
border: 1px solid #ccc;
}


--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?id=132

 
Reply With Quote
 
 
 
 
Allen
Guest
Posts: n/a
 
      09-08-2003
Hello Toby,

Monday, September 8, 2003, 3:08:55 AM, you wrote:

TAI> Tora wrote:

>> TABLE.mystyle
>> { border: 1;
>> frame: box;
>> }


TAI> Perhaps:

TAI> table.mystyle {
TAI> border: 1px dotted blue;
TAI> }

To elaborate,
when specifying a border in css, you MUST specify more than just the
size attribute; you need to also specify a style { such as dotted,
dashed, solid } and, preferably, a color. Toby gave you some good
examples of how this can be done.

Allen

 
Reply With Quote
 
Toby A Inkster
Guest
Posts: n/a
 
      09-08-2003
Allen wrote:

> when specifying a border in css, you MUST specify more than just the
> size attribute; you need to also specify a style { such as dotted,
> dashed, solid } and, preferably, a color.


Hmmm... it is possible to just specify a border width. The important thing
is to qualify your number (1) with a unit (em, px, ex, %, etc).

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?id=132

 
Reply With Quote
 
Crepe
Guest
Posts: n/a
 
      09-08-2003
Toby,

Monday, September 8, 2003, 2:07:07 PM, you wrote:

TAI> Allen wrote:

>> when specifying a border in css, you MUST specify more than just the
>> size attribute; you need to also specify a style { such as dotted,
>> dashed, solid } and, preferably, a color.


TAI> Hmmm... it is possible to just specify a border width. The important thing
TAI> is to qualify your number (1) with a unit (em, px, ex, %, etc).

Indeed, it is -possible-, but poor practice. My wording was
over-the-top, I'll admit. But if you want your page rendering to be
concise/consistent from browser to browser, platform to platform, it
is wise to specify specifics. While the css specifications DO outline
what SHOULD be used by default if no user-defined attributes are
specified, these are not always followed. IE is the biggest proponent
of bad-standards-compliance.

Be well.

--
In order to reach me via email, the subject MUST be:
lettuce tea

 
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
specify a style for the table outside the <TABLE> block Rahul HTML 5 07-23-2009 08:10 PM
All style tags after the first 30 style tags on an HTML page are not applied in Internet Explorer Rob Nicholson ASP .Net 3 05-28-2005 03:11 PM
Table/table rows/table data tag question? Rio HTML 4 11-05-2004 08:11 AM
Need help with Style conversion from Style object to Style key/value collection. Ken Varn ASP .Net Building Controls 0 04-26-2004 07:06 PM
Could not load type VTFixup Table from assembly Invalid token in v-table fix-up table. David Williams ASP .Net 2 08-12-2003 07:55 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57