![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Banned
![]() ![]() |
Automatic Table Templates?
I'm assuming this is CSS. How would I add something to the top of an html file to make it so any table I make automatically has a certain design/properties to it?
|
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Nov 2005
Posts: 122
Rep Power: 4
![]() |
What are you using the tables for?
<style type="text/css">
table
{
width:100px;
...
}
</style>
__________________
"I'm going to become rich and famous when I invent a device that allows you to stab people in the face over the internet" |
|
|
|
|
|
#3 |
|
Banned
![]() ![]() |
I'm using it for a statistic display site.
It seems to work well. What are some other paramaters I can use in there? |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Nov 2005
Posts: 122
Rep Power: 4
![]() |
Pretty much anything. Or don't you know any CSS?
__________________
"I'm going to become rich and famous when I invent a device that allows you to stab people in the face over the internet" |
|
|
|
|
|
#5 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
W3Schools helped me out a lot for initial learning. The reference isn't bad, but doesn't go into enough detail.
http://www.w3schools.com/css/
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
|
|
#6 |
|
Expert Programmer
|
http://www.w3schools.com/css/css_reference.asp <--- a reference
__________________
Join us at #programmingforums @ irc.freenode.net! My software never has bugs. It just develops random features.
|
|
|
|
|
|
#7 |
|
Banned
![]() ![]() |
I know absolutely no CSS or any website language for that matter (except HTML forms and simple output). Thanks for the reference links.
|
|
|
|
|
|
#8 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Indeed, Google is your friend, but rarely visits uninvited.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#9 |
|
Expert Programmer
|
For cell padding, you can use:
td {
padding: Xpx;
border: inset Xpx;
}table {
border-collapse: separate;
border-spacing: 10px;
border: outset Xpx;
}Another way to do this, if you want the space between cells to have a color: table {
border-collapse: collapse;
}
td {
border: solid 5px yellow;
}Also, remember that the cellspacing and cellpadding table attributes are not deprecated even in XHTML 1.1. You'll find this page very useful. It has everything you'll ever want to know about tables and CSS. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|