Hello,
is it possible to draw a one pixel line around every cell in a table?
with "border: 1px solid; " just the outer tableborder ist concerned ?
thanks for any help
rolf 6 3307
On Wed, 15 Sep 2004 10:22:37 +0200, Rolf Brauser wrote: is it possible to draw a one pixel line around every cell in a table?
Sure.
Why do you not provide a complete example
of what your are doing though, as it makes
it a lot easier for people to help.
<http://www.spartanicus.utvinternet.ie/help_us_help_you.htm>
with "border: 1px solid; " just the outer tableborder ist concerned ?
Try this
<head>
.....
<style type='text/css'>
td {
border: solid 1px red;
}
</style>
</head>
<body>
....
thanks for any help
No worries.
--
Andrew Thompson http://www.PhySci.org/ Open-source software suite http://www.PhySci.org/codes/ Web & IT Help http://www.1point1C.org/ Science & Technology
Rolf Brauser wrote: Hello,
is it possible to draw a one pixel line around every cell in a table? with "border: 1px solid; " just the outer tableborder ist concerned ?
thanks for any help rolf
This works for me:
table {
border: 2px solid #000;
empty-cells: show;
border-collapse: collapse;
}
th, td {
border: 1px solid #000;
}
> This works for me:
table { border: 2px solid #000; empty-cells: show; border-collapse: collapse; }
th, td { border: 1px solid #000; }
Thanks, thats nice, thats truly 1 pixel arround every cell.
But that also means that where cells are touching the 1pixel is added to its
neighbourcell and so the border is 2 pixels broad.
Im looking for a solution where the border never is broader than 1 pixel,
independent from its structure (colspan or not).
Rolf Brauser wrote: Im looking for a solution where the border never is broader than 1 pixel, independent from its structure (colspan or not).
Then put a border to the table's top and left, and to the cells' right
and bottom.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Rolf Brauser wrote: This works for me:
table { border: 2px solid #000; empty-cells: show; border-collapse: collapse; }
th, td { border: 1px solid #000; }
Thanks, thats nice, thats truly 1 pixel arround every cell. But that also means that where cells are touching the 1pixel is added to its neighbourcell and so the border is 2 pixels broad.
Not on my browser it's not, although my eyesight is not good enough to
be 100% sure. {border-collapse: collapse} causes the two borders to
collapse into one. Of course, rounding could cause differences between
different browsers. Read the specification: http://www.w3.org/TR/CSS21/tables.ht...apsing-borders
Im looking for a solution where the border never is broader than 1 pixel, independent from its structure (colspan or not).
I wouldn't know about colspan as I have never used it in this context.
Regards
Paul
Rolf Brauser / 2004-09-16 11:04:
[> Paul wrote] This works for me:
table { border: 2px solid #000; empty-cells: show; border-collapse: collapse; }
th, td { border: 1px solid #000; }
Thanks, thats nice, thats truly 1 pixel arround every cell. But that also means that where cells are touching the 1pixel is added to its neighbourcell and so the border is 2 pixels broad. Im looking for a solution where the border never is broader than 1 pixel, independent from its structure (colspan or not).
Above rules does *exactly* that -- assuming that your user agent
(commonly known as "browser") isn't broken and supports CSS.
If "td { border: solid black 1px }" results to more than a single
line of pixels between the cells and UA/display combination is able
to draw single pixel lines at all, the the user agent incorrectly
behaves like table had rule "border-collapse: separate". Some old
releases of Mozilla/Netscape did this.
--
Mikko This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: DraguVaso |
last post by:
Hi,
I have an inherited DataGrid, that does lots of extra stuff. For exemple
drawing a backgroundimage in every cell. The problem is that it's taking too
much time (using gdi+), so I want to do...
|
by: George |
last post by:
I cannot understand how to fix my code so that it will work. It needs
to draw a series of lines in different colors and save it to a ppm
file. Could someone tell me what I have done wrong. Thanks a...
|
by: Michael Rodriguez |
last post by:
In Delphi there was a control called a Bevel. It would let you draw
straight lines, top, left, right, or bottom, anywhere on your screen.
What is the equivalent in C#? How can I draw a straight...
|
by: Kirk Graves |
last post by:
I have an html table that I am filling with data from the database. when I
put the text in the table, I only display the number of characters that will
fit based on the size of the cell.
I know...
|
by: dan heskett |
last post by:
I am owner-drawing a listbox, in an attempt to create a nice list with some
custom "fields" and text layout.
Essentially it works, but I must be missing something big, conceptually,
because I...
|
by: UJ |
last post by:
I have a table with multiple cells and I want to draw a box around the
entire table but not around the individual cells. How do I do that?
TIA - Jeff.
|
by: IvoShalev |
last post by:
Hi there,
I just want to give some sudgestions on how to draw some plain things
only using the header file <graphics.hand of course the standart
files <stdio.h<conio.h<stdlib.h>.
First of All...
|
by: tcv |
last post by:
Hi folks,
I have a need to draw customized table dynamically in my asp.net page. For example, i have a template table of 2 rows and 6 colums. Depending on the data from the backend I need to re...
|
by: Kevinst |
last post by:
Hello,
currently I am working on the following scenario:
There is a device connected to my application. That device has a 256x256 pixel display showing graphics and text.
Now for each pixel...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |