Title: CSS code didn&#8217;t work properly
Last modified: January 16, 2022

---

# CSS code didn’t work properly

 *  [amirhoseinkhajehnouri](https://wordpress.org/support/users/amirhoseinkhajehnouri/)
 * (@amirhoseinkhajehnouri)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/html-code-didnt-work-properly/)
 * Hello
    I used this code for making table in page but background color and hover
   didn’t work ( it doesn’t show anything except table
 *     ```
       <style>
       #simple_table {
       	font-family: arial, sans-serif;
       	 border-collapse: collapse; 
       	 width: 100%;
       	background-color: #ffffff;
       	color:black;
       }
       #simple_table td, #simple_table th {
       	 text-align: left;
       	 padding: 8px;
       	 border: 1px solid #dddddd;
       }
       #simple_table tr:nth-child(even) {
       	background-color: #f7f7f7;
       }
       #simple_table tr:hover {
       	background-color: #dedede;
       }
       #simple_table tr > th 
       {
       	background: #070651;
       	 color: #ffffff;
       }
       </style>
        <table id='simple_table' >
       <tr>
       	<th></th>
       	<th>واحد</th>
       	<th>: کد</th>
       </tr>
   
       <tr>
       	<td></td>
       	<td>–	</td>
       	<td>: Title</td>
       </tr>
       <tr>
       	<td></td>
       	<td>mm	</td>
       	<td>: قطر</td>
       </tr>
       <tr>
       	<td></td>
       	<td>گرم</td>
       	<td>: وزن</td>
       </tr>
       <tr>
       	<td></td>
       	<td>رو</td>
       	<td>طرح</td>
       </tr>
       <tr>
       	<td></td>
       	<td>پشت</td>
       	<td>طرح</td>
       </tr>
       <tr>
       	<td></td>
       	<td></td>
       	<td>توضیحات</td>
       </tr>
       </table>
       ```
   
    -  This topic was modified 4 years, 4 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
    -  This topic was modified 4 years, 4 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhtml-code-didnt-work-properly%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Jeroen Rotty](https://wordpress.org/support/users/jeroenrotty/)
 * (@jeroenrotty)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/html-code-didnt-work-properly/#post-15257624)
 * When you want to style the table, you need to add the CSS but not inline. So 
   you can add the CSS to Appearance > Customizer > Custom CSS.
 * Now, your code is added to the page source, but as plain text:
 * See:
 *  Thread Starter [amirhoseinkhajehnouri](https://wordpress.org/support/users/amirhoseinkhajehnouri/)
 * (@amirhoseinkhajehnouri)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/html-code-didnt-work-properly/#post-15257643)
 * Thank u for your response
    but my code has the style (background color and hover)
   itself how to extract CSS from html ? and determine it for specify page Thanks
   in advanced

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘CSS code didn’t work properly’ is closed to new replies.

## Tags

 * [background](https://wordpress.org/support/topic-tag/background/)
 * [color](https://wordpress.org/support/topic-tag/color/)
 * [hover](https://wordpress.org/support/topic-tag/hover/)
 * [problem](https://wordpress.org/support/topic-tag/problem/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [amirhoseinkhajehnouri](https://wordpress.org/support/users/amirhoseinkhajehnouri/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/html-code-didnt-work-properly/#post-15257643)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
