Jump to content
gregaryb

Wh wont this class work?

Recommended Posts

<table class="CartDetailsTable"> <tr><th width="33%"><b>Photo</b></th><th width="33%"><b>Description</b></th><th width="10%"><b>Price</b></th><th width="15%"><b>Quantity</b></th><th><b>Sub-totals</b></th></tr>

</table>

 

.ClientDetailsTable{ background-color:#C0C0C0; width:99%; border:thin black solid; border-radius:5px; }; .CartDetailsTable{ background-color:#C0C0C0; width:99%; border:thin black solid; margin-left:10px; border-radius:5px; }; class ClientDetailsTable works quite happily on another table but class CartDetailsTable wont work on the above table. I can however apply class ClientDetailsTable to the above table and it works happily.

 

If I swap the position of the two classes so that CartDetailsTable is the first one then it works while class ClientDetailsTable stops working.

 

What the bloody ###### is going on here????????

 

Is there some bizarre rule with CSS class naming that I don't know about?

Edited by gregaryb

Share this post


Link to post
Share on other sites

Are any of the styles working? Is the table nested inside another element that could be overiding the class styles?

Share this post


Link to post
Share on other sites

validation error '};'

 

probably gets past the first, but semi colon causes the other one to fail.

Edited by dsonesuk

Share this post


Link to post
Share on other sites

Are any of the styles working? Is the table nested inside another element that could be overiding the class styles?

What you see is what you get. I have not applied styles to the table other than through the classes.

 

I suspect I would be better off doing this with divs rather than tables. There seems like there is too much 'baggage' that comes with tables that seems to stuff things up unexpectedly.

Share this post


Link to post
Share on other sites

BAD :(

 

.ClientDetailsTable{ background-color:#C0C0C0; width:99%; border:thin black solid; border-radius:5px; }; .CartDetailsTable{ background-color:#C0C0C0; width:99%; border:thin black solid; margin-left:10px; border-radius:5px; };

 

GOOD. :D

 

.ClientDetailsTable{ background-color:#C0C0C0; width:99%; border:thin black solid; border-radius:5px; } .CartDetailsTable{ background-color:#C0C0C0; width:99%; border:thin black solid; margin-left:10px; border-radius:5px; }

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...