Hi,
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.
What I have is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtm11/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head><title>crap</title>
<style type="text/css">
table {border: 2px;
font-size: 16pt;
color: blue;
}
</style>
</head>
<body>
<table>
<tr>
<tdtest test</td>
<tdtest2 test2</td>
</tr>
<tr>
<tdcrap crap </td>
<tdtest3 test3</td>
</tr>
</table>
</body>
</html>
Why do I not get a 2pixel border? Or any border?
Thanks for your help
Michael 8 1513
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
On 2006-10-08, Michael wrote:
Hi,
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.
What I have is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtm11/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head><title>crap</title>
<style type="text/css">
table {border: 2px;
font-size: 16pt;
color: blue;
}
</style>
</head>
<body>
<table>
<tr>
<tdtest test</td>
<tdtest2 test2</td>
</tr>
<tr>
<tdcrap crap </td>
<tdtest3 test3</td>
</tr>
</table>
</body> </html>
Why do I not get a 2pixel border? Or any border?
You must specify the type of border, e.g.:
table {
border: 2px solid;
}
And perhaps the color, as well:
table {
border: 2px solid black;
}
--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Scripsit David Dorward:
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/
On Sun, 8 Oct 2006 16:51:21 +0800, "Michael" <mi*********@yahoo.com>
wrote:
>Hi,
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.
What I have is:
snip>>>>>>>>>>
> Thanks for your help
Michael
Hi Michael,
There is a site that gives about 80 samples of CSS table design. Some
are more than a little over the top but I have always found it useful
to at least see how they do it: http://icant.co.uk/csstablegallery/index.php
All the best,
Andrew
--
Andrew http://www.andrews-corner.org/
"David Dorward" <do*****@yahoo.comwrote in message
news:eg*******************@news.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
"Michael" <mi*********@yahoo.comwrote in message
news:45**********************@per-qv1-newsreader-01.iinet.net.au...
>
"David Dorward" <do*****@yahoo.comwrote in message
news:eg*******************@news.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
In article
<45**********************@per-qv1-newsreader-01.iinet.net.au>,
"Michael" <mi*********@yahoo.comwrote:
"Michael" <mi*********@yahoo.comwrote in message
news:45**********************@per-qv1-newsreader-01.iinet.net.au...
"David Dorward" <do*****@yahoo.comwrote in message
news:eg*******************@news.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!
Michael wrote:
>>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.
>>(and don't forget the border-color).
You're still forgetting the border colour.
>>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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Martin Mrazek |
last post by:
Hi,
I have tables named like ag97a027, ag98a027, ... where 97 and 98 is
from year 1997, 1998 and a027 is just specification of product type. I
need carry out repeated operataions over these...
|
by: Mel |
last post by:
i see a lot of stuff going back and forth, tables are easy to use and do
exactly what the name says it does ROWS/COLUMNS
what is a GOOD reason to use DIVs instead ?
thanks
Mel
|
by: Mel |
last post by:
Are we going backwards ? (please excuse my spelling...)
In my opinion an absolute YES !
Take a look at what we are doing ! we create TAGS, things like <H1> etc.
and although there are tools...
|
by: LedZep |
last post by:
What up,
All I need to do is enter a last name in a text box, query a MSAccess
database and display the name with the corresponding columns. This is
no problem, but when there are more than one...
|
by: tnks |
last post by:
hi
i have a data grid (i fill when i run the program) then the user insert rows
and i wana save..
i used SqlClient.SqlCommandBuilder but it fail, just save 1 recordr, some
times 2 records,...
|
by: cj |
last post by:
I have lots of tables to copy from one server to another. The new
tables have been created to match the old ones. I practiced with one
table. I created the select command (select * from tableA)...
|
by: sparks |
last post by:
We get more and more data done in excel and then they want it imported
into access.
The data is just stupid....values of 1 to 5 we get a lot of 0's ok
that alright but 1-jan ?
we get colums...
|
by: wildman |
last post by:
It's been over 10 years that I don't look at Access. I've been working
in asp.net for the last 5 developing intranet sites.
Just got a project where we are trying to avoid building an...
|
by: Chris M. Thomasson |
last post by:
I use the following technique in all of my C++ projects; here is the example
code with error checking omitted for brevity:
_________________________________________________________________
/*...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |