Title: Apply CSS from PHP
Last modified: October 11, 2016

---

# Apply CSS from PHP

 *  [lakhmichand](https://wordpress.org/support/users/lakhmichand/)
 * (@lakhmichand)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/apply-css-from-php/)
 * Hi,
 * I have css code on page and this code work ok, but now I need call this code 
   from php.
 * I have this code in Php:
 * <?php
 * if( current_user_can(‘secretaria’)) {
 * ** I need put here css rules **
    } ?>
 * My CSS rules are this:
    .et_fullwidth_nav #main-header .container { width: 100%;
   max-width: 100%; padding-right: 30px; padding-left: 30px; display: none; visibility:
   hidden; } #top-header .container { padding-top: 0.75em; font-weight: 600; visibility:
   hidden; } #wpadminbar { z-index: 100001; display: none; visibility: hidden; }.
   main_title { margin-bottom: 20px; display: none; visibility: hidden; }
 * Please, how can I change css from Php or similar action.
 * Thanks,

The topic ‘Apply CSS from PHP’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [lakhmichand](https://wordpress.org/support/users/lakhmichand/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/apply-css-from-php/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
