Title: CSS classes not getting applied to html code in wordpress
Last modified: August 21, 2016

---

# CSS classes not getting applied to html code in wordpress

 *  Resolved [pringole](https://wordpress.org/support/users/pringole/)
 * (@pringole)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/css-classes-not-getting-applied-to-html-code-in-wordpress/)
 * _[Moved from Your WordPress which is NOT a support forum.]_
 * I am actually trying to integrate my static html pages with TWENTY TWELVE theme
 * as far as my knowledge i understood that i need to add my header section into
   header.php and footer to footer.php and for the content part i need to add template
   and for adding css & js function call need to add them function.php
 * but after doing all this things my CSS classes doesnot get applied to html code
   which i have added to header section as well as footer section . after inspecting
   i came to know my css classes are loaded properly but doesnot get applied please
   help me solve this issue

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/css-classes-not-getting-applied-to-html-code-in-wordpress/#post-4974630)
 * Do not edit the theme itself. First [create a child theme for your changes](http://codex.wordpress.org/Child_Themes).
   Or create a new standalone theme
 *  [CrouchingBruin](https://wordpress.org/support/users/crouchingbruin/)
 * (@crouchingbruin)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/css-classes-not-getting-applied-to-html-code-in-wordpress/#post-4974650)
 * Please post a link to your site; it is impossible to offer suggestions otherwise.
 *  Thread Starter [pringole](https://wordpress.org/support/users/pringole/)
 * (@pringole)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/css-classes-not-getting-applied-to-html-code-in-wordpress/#post-4974759)
 * [@crouchingbruin](https://wordpress.org/support/users/crouchingbruin/) please
   find the link [http://shoppersdesign.com/](http://shoppersdesign.com/)
 *  Thread Starter [pringole](https://wordpress.org/support/users/pringole/)
 * (@pringole)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/css-classes-not-getting-applied-to-html-code-in-wordpress/#post-4974764)
 * [@esmi](https://wordpress.org/support/users/esmi/)
    I tried creating child theme
   after refering to the link which you had provided but no luck.having same particular
   problem where my header.php code get loaded but css classes are not getting applied
   to it.
 * I have even checked the whether my css classes are loaded properly or not
    but
   after inspecting i came to know it is loaded properly.
 * **so issue is still there**.
 *  [CrouchingBruin](https://wordpress.org/support/users/crouchingbruin/)
 * (@crouchingbruin)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/css-classes-not-getting-applied-to-html-code-in-wordpress/#post-4974766)
 * I see your child theme’s style.css file being read in. Can you give me a specific
   example of a CSS rule in there which you do not think is being used? For example,
   I see rules for a **footer** class, but I don’t see any elements on your home
   page that have a class of **footer**.
 *  Thread Starter [pringole](https://wordpress.org/support/users/pringole/)
 * (@pringole)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/css-classes-not-getting-applied-to-html-code-in-wordpress/#post-4974767)
 * Actually it not getting applied to whole header section
    <div class=”header-section”
   >
 *  [CrouchingBruin](https://wordpress.org/support/users/crouchingbruin/)
 * (@crouchingbruin)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/css-classes-not-getting-applied-to-html-code-in-wordpress/#post-4974782)
 * OK, the main problem that you have right now is that you have a CSS file called
   print.css in your CSS folder that is hiding major portions of your page with 
   this rule:
 *     ```
       .header-container,
       .footer-before-container,
       .footer-container,
       .widget,
       .pager,
       .toolbar,
       .actions,
       .buttons-set { display:none !important; }
       ```
   
 * This rule is fine, because you normally want to hide all of those elements when
   printing. The problem is that you need to enclose everything inside that file
   within something called a media query so that it’s in effect only when printing,
   and not when it’s being viewed on the screen.
 * So edit your print.css file so it looks like this:
 *     ```
       /**
   
        */
       @media print {
       *     { /* background:none !important; */ text-align:left !important; }
       body  { background:#fff !important; font-size:9pt !important; margin:15px !important; }
   
       .header-container,
       .footer-before-container,
       .footer-container,
       .widget,
       .pager,
       .toolbar,
       .actions,
       .buttons-set { display:none !important; }
   
       .page-print .data-table .cart-tax-total { background-position:100% -54px; }
       .page-print .data-table .cart-tax-info { display:block !important; }
       }
       ```
   
 * So what I did was add a line at the top that reads **[@media](https://wordpress.org/support/users/media/)
   print {** and then a closing right brace **}** at the very end, so these rules
   will only be in effect when printing. Once you do that, you’ll find that everything
   that’s missing will appear on your screen.
 *  Thread Starter [pringole](https://wordpress.org/support/users/pringole/)
 * (@pringole)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/css-classes-not-getting-applied-to-html-code-in-wordpress/#post-4974801)
 * **Thanks Master.
    please keep up the good work. Thanks once again.

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

The topic ‘CSS classes not getting applied to html code in wordpress’ is closed 
to new replies.

## Tags

 * [css3](https://wordpress.org/support/topic-tag/css3/)
 * [html5](https://wordpress.org/support/topic-tag/html5/)

 * 8 replies
 * 3 participants
 * Last reply from: [pringole](https://wordpress.org/support/users/pringole/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/css-classes-not-getting-applied-to-html-code-in-wordpress/#post-4974801)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
