• Page 1 of 1
  • 1
Forum moderator: bigblog  
uCoz Community » For Webmasters » Custom Solutions » Table css issue
Table css issue
ucozpp
Posts: 27
Reputation: 0

Message # 1 | 1:01 AM
I use below code to decor my table.

But it makes some problem for my site. There are two tables as below but actually it should not be showed up. Could you please help solve this? Thanks!

URL to ok page: _http://adnet.ucoz.co.uk/publ/noun_gender/1-1-0-1
URL to error page: _http://adnet.ucoz.co.uk/publ/adverbs/forming_adverbs_from_adjectives/3-1-0-19

Code
<style>
table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    text-align: left;
    padding: 8px;
}

tr:nth-child(even){background-color: #f2f2f2}

th {
    background-color: #4CAF50;
    color: white;
}
</style>


Screenshot:
Attachments: 8385693.png(52.8 Kb)
Post edited by ucozpp - Thursday, 2016-05-26, 1:02 AM
bigblog
Twink
Posts: 1537
Reputation: 72

Message # 2 | 11:00 AM
ucozpp, instead of applying the design to all the table elements, specify them for the comment form table only. That's if you only want the comment form to be designed.

Here's the code:

Code
<style>
table.commTable {
    border-collapse: collapse;
    width: 100%;
}

.commTable th, .commTable td {
    text-align: left;
    padding: 8px;
}

.commTable tr:nth-child(even){background-color: #f2f2f2}

.commTable th {
    background-color: #4CAF50;
    color: white;
}
</style>


If you want to apply the styles to each table element, remove the following code from "Appearance of comments", "Comment posting form" or "Page with full post text and associated comments" (it must match exactly):

Code
<tr><td colspan="2" align="center"></td></tr>


and

Code
<tr><td colspan="2" height="10"></td></tr>

hey i'm joe and i'm a twink, please enjoy your stay

i do not work for the company anymore, sorry for the late replies
icon by Nathan Butler
ucozpp
Posts: 27
Reputation: 0

Message # 3 | 11:27 AM
Thanks much for your help.
uCoz Community » For Webmasters » Custom Solutions » Table css issue
  • Page 1 of 1
  • 1
Search: