HighDots Forums  

encapsultating TABLE attributes in CSS

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss encapsultating TABLE attributes in CSS in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default encapsultating TABLE attributes in CSS - 06-23-2004 , 06:40 PM






I have a table style like this:
table.gridmenu /* tables used for creating menus of clickable buttons
*/ {
background : #fbf4d8;
color : #0080ff;
font : 80% Arial,Helvetica,sans-serif;
}

When I use it I add some extra stuff like this:

<table border="7" cellpadding="10" class="gridmenu" >

I have horsed around but can't seem to figure out what to do to the
table.gridmenu or a td.gridmenu style to build in the border and
cellpadding.

I wonder if the problem is I need to individually add the gridmenu
attribute to every ruddy cell. Surely not!

Reply With Quote
  #2  
Old   
Andrew Urquhart
 
Posts: n/a

Default Re: encapsultating TABLE attributes in CSS - 06-23-2004 , 07:18 PM






*Roedy Green* wrote:
Quote:
I have a table style like this:
table.gridmenu /* tables used for creating menus of clickable buttons
*/ {
background : #fbf4d8;
color : #0080ff;
font : 80% Arial,Helvetica,sans-serif;
}

When I use it I add some extra stuff like this:

table border="7" cellpadding="10" class="gridmenu"

I have horsed around but can't seem to figure out what to do to the
table.gridmenu or a td.gridmenu style to build in the border and
cellpadding.

I wonder if the problem is I need to individually add the gridmenu
attribute to every ruddy cell. Surely not!
Don't forget that you can additionally specify:

table.gridmenu td {
padding: 10px;
border: 7px;
border-collapse: collapse;
/* etc. */
}

Is this what you were looking for?
--
Andrew Urquhart
- FAQ: www.css.nu/faq/ciwas-aFAQ.html
- Archive: www.tinyurl.com/ysjbm (Google Groups)
- My reply address is invalid, use: www.andrewu.co.uk/contact/




Reply With Quote
  #3  
Old   
Roedy Green
 
Posts: n/a

Default Re: encapsultating TABLE attributes in CSS - 06-23-2004 , 07:41 PM



On Thu, 24 Jun 2004 01:18:52 +0100, "Andrew Urquhart"
<useWebsiteInSignatureToReply (AT) spam (DOT) invalid> wrote or quoted :

Quote:
table.gridmenu td {
padding: 10px;
border: 7px;
border-collapse: collapse;
/* etc. */
}

Is this what you were looking for?
I tried various permutations of table gridmenu and td, with and
without dots. Perhaps that one is the key. Thanks.

I think I suddenly get how it works.


--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.


Reply With Quote
  #4  
Old   
Andrew Thompson
 
Posts: n/a

Default Re: encapsultating TABLE attributes in CSS - 06-23-2004 , 08:05 PM



On 23 Jun 2004 16:40:07 -0700, Roedy Green wrote:

Quote:
I have a table style like this:
table.gridmenu /* tables used for creating menus of clickable buttons
*/ {
background : #fbf4d8;
color : #0080ff;
font : 80% Arial,Helvetica,sans-serif;
}
You mean this one?
<http://mindprod.com/jgloss/css.html>

You can apply a style to any child
element of table represented by..
<table class="gridmenu" border="0" cellspacing="4" cellpadding="4">
...ask the CSS experts how.

It might pay to lose the..
[ .. border="0" cellspacing="4" cellpadding="4".. ]
...though.

HTH

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology


Reply With Quote
  #5  
Old   
Roedy Green
 
Posts: n/a

Default Re: encapsultating TABLE attributes in CSS - 06-24-2004 , 12:23 AM



On Thu, 24 Jun 2004 01:05:07 GMT, Andrew Thompson
<SeeMySites (AT) www (DOT) invalid> wrote or quoted :

Quote:
It might pay to lose the..
[ .. border="0" cellspacing="4" cellpadding="4".. ]
..though.
Ok, I am cooking now thanks to your help.

table.gridmenu td /* tables used for creating menus of clickable
buttons */ {
border-style : outset;
border-width : 2px;
border-color: #808080;
padding : 5px;
margin : 5px;
}

works fine, except the margin command seems to be ignored. I am using
Opera 7.5. It acts as if margin=1px no matter what I set it to.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.


Reply With Quote
  #6  
Old   
David Dorward
 
Posts: n/a

Default Re: encapsultating TABLE attributes in CSS - 06-24-2004 , 02:47 AM



Roedy Green wrote:

Quote:
works fine, except the margin command seems to be ignored. I am using
Opera 7.5. It acts as if margin=1px no matter what I set it to.
Table cells don't have margins. Look up "border-spacing" (as applied to the
<table>).


--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


Reply With Quote
  #7  
Old   
AT
 
Posts: n/a

Default Re: encapsultating TABLE attributes in CSS - 06-24-2004 , 08:03 AM



Roedy Green <look-on (AT) mindprod (DOT) com.invalid> wrote:

Quote:
On Thu, 24 Jun 2004 01:05:07 GMT, Andrew Thompson
SeeMySites (AT) www (DOT) invalid> wrote or quoted :

It might pay to lose the..
[ .. border="0" cellspacing="4" cellpadding="4".. ]
..though.

Ok, I am cooking now thanks to your help.

table.gridmenu td /* tables used for creating menus of clickable
buttons */ {
border-style : outset;
border-width : 2px;
border-color: #808080;
padding : 5px;
margin : 5px;
}

works fine, except the margin command seems to be ignored. I am using
Opera 7.5. It acts as if margin=1px no matter what I set it to.
border-collapse: separate;
border-spacing: 4px;

--


Reply With Quote
  #8  
Old   
Roedy Green
 
Posts: n/a

Default Re: encapsultating TABLE attributes in CSS - 06-24-2004 , 01:05 PM



On 24 Jun 2004 06:03:41 -0700, wolfgangwildeblood (AT) yahoo (DOT) com.au
(Wolfgang Wildeblood) wrote or quoted :

Quote:
works fine, except the margin command seems to be ignored. I am using
Opera 7.5. It acts as if margin=1px no matter what I set it to.

border-collapse: separate;
border-spacing: 4px;
Thanks. All is behaving now. These work, but they have to go on the
table not the td.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.