Thread: Stylesheet producing ugly tables
Results 1 to 7 of 7
Related
-
How do make my cascading stylesheet work? Forum: CSS Forum
Replies: 6 -
print stylesheet question Forum: CSS Forum
Replies: 1 -
CSS Print stylesheet Forum: CSS Forum
Replies: 7 -
Stylesheet/table problem Forum: CSS Forum
Replies: 3 -
My stylesheet is being partially ignored Forum: CSS Forum
Replies: 2
-
07-15-2003, 02:38 AM #1
Stylesheet producing ugly tables
Here is my stylesheet that is included in every part of my program:
Code:<? include ("../settings.php"); ?> table,td,tr,th { border-color: <? echo $bordercolor ?>; border-width: <? echo $borderwidth ?>px; border-style: <? echo $borderstyle ?>; border-collapse: collapse; color: <? echo $textcolor ?>; } a:link { color: <? echo $alink ?>; } a:visited { color: <? echo $vlink ?>; } p { color: <? echo $pcolor ?>; } h1, h2, h3, h4, h5, h6, h7 { color: <? echo $hcolor ?>; }
-
07-15-2003, 12:08 PM #2
hiya, welcome to the forums.
Firstly, I would separate the css for table , td & tr.
You can use a 1px border around the table. Then a 1px border around each cell. Then remove cellspacing and cellpadding from the cells/table. This will give an overall 2px effect, but it looks better than the double one.
You other choice is to manually use style="blah" to set each cells separate borders. prob not an option.
oops, there is a third choice. Set the table 'background-color' to the color you wish to have the border, then set cellspacing to 1px. Then remove your borders, this will 'fake' a decent border.If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
07-15-2003, 10:05 PM #3
Thanks, I love that third option it really improved the look of my program.
Thanks,
Chris
-
08-07-2003, 04:19 PM #4
Originally Posted by blasto333
a
-
08-07-2003, 04:24 PM #5
Excellent.
Its a nice-looking, cross-browser method.If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
08-08-2003, 09:01 AM #6
grid lines don't print with the background mehtod
I really like the third method above, by using the background, however, when I try to print the report, the "gridlines" do not show.
Here is the style
/* main body grid of report */
table.clsMain {
width: 100%;
background-color: Gray;
font-size: smaller;
}
tr.clsMainHeader {
background-color: Silver;
text-align: left;
border-width: medium;
}
tr.clsMainData {
text-align: left;
}
Thanks
-
08-09-2003, 09:49 AM #7
Ah yes. That is a client-side choice.
By default, IE does not print background-colors. if its just you, then goto Tools->Internet Options->Advanced->Print Background Colors
If its for the general public, then your best bet is to use one of the other two methods mentioned above.If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum