Title: Personalized CSS
Last modified: May 15, 2021

---

# Personalized CSS

 *  Resolved [sbazaars](https://wordpress.org/support/users/sbazaars/)
 * (@sbazaars)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/personalized-css/)
 * Hi, there is any method to personalized the layout of the widget (Legacy) with
   CSS? I have investigated on the page and have seen that there are more class 
   but all external to website telegram.org (exactly: [https://telegram.org/css/widget-frame.css?45](https://telegram.org/css/widget-frame.css?45))
   so when i try to personalized this class seems that i can’t and the layout won’t
   change. So is a simple problem of “cascating sheet” or we can’t modified these
   class with the simple “custom CSS” section of WordPress? Thank you.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpersonalized-css%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Manzoor Wani](https://wordpress.org/support/users/manzoorwanijk/)
 * (@manzoorwanijk)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/personalized-css/#post-14442646)
 * Hi,
    The widget is displayed in an `iframe`, that is why your website styles 
   don’t work. We have a filter to add styles into the iframe via a WP/PHP filter.
   Here is an example to make the body background color red.
 *     ```
       add_filter( 'wptelegram_widget_post_injected_styles', 'wptelegram_legacy_widget_styles', 10, 1 );
       function wptelegram_legacy_widget_styles( $styles ) {
       	// Add the custom styles here
       	return $styles . '
       	    body {
       	    	background-color: red;
       	    }
       	';
       }
       ```
   
 *  Thread Starter [sbazaars](https://wordpress.org/support/users/sbazaars/)
 * (@sbazaars)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/personalized-css/#post-14442707)
 * Thank you very much it work 🙂
 *  [Manzoor Wani](https://wordpress.org/support/users/manzoorwanijk/)
 * (@manzoorwanijk)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/personalized-css/#post-14442733)
 * Great! You are welcome.
 * You may write a review.
 *  Thread Starter [sbazaars](https://wordpress.org/support/users/sbazaars/)
 * (@sbazaars)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/personalized-css/#post-14996058)
 * Hi it’s possible to personalize also the Ajax Widget CSS? if yes how i can do
   this?
 *  [Michiel](https://wordpress.org/support/users/michiel/)
 * (@michiel)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/personalized-css/#post-15305218)
 * Hi! This is a great plugin!
    The above code does not work with the Ajax Widget.
   What should I do to make that work? Many thanks!
 *  Plugin Author [Irshad Ahmad](https://wordpress.org/support/users/irshadahmad21/)
 * (@irshadahmad21)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/personalized-css/#post-15305366)
 * For ajax widget, you can use
 * `wptelegram_widget_ajax_widget_injected_styles`
    in place of `wptelegram_widget_post_injected_styles`
 *  [Michiel](https://wordpress.org/support/users/michiel/)
 * (@michiel)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/personalized-css/#post-15305916)
 * Thank you for getting back to me!
    I tried the following but it seems not to 
   work, is there something else I should change?
 * MANY thanks!!!
 *     ```
       add_filter( 'wptelegram_widget_ajax_widget_injected_styles', 'wptelegram_legacy_widget_styles', 10, 1 );
       function wptelegram_legacy_widget_styles( $styles ) {
       	// Add the custom styles here
       	return $styles . '
       	    body {
       	    	background-color: #000000;
       	    }
       	';
       }
       ```
   
 *  Plugin Author [Irshad Ahmad](https://wordpress.org/support/users/irshadahmad21/)
 * (@irshadahmad21)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/personalized-css/#post-15305947)
 * That’s correct and it should work. May be some existing style there is overriding
   yours. Try adding `!important` to the value.
 *  [Michiel](https://wordpress.org/support/users/michiel/)
 * (@michiel)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/personalized-css/#post-15305954)
 * Bingo! That works!!
 * Thank you!

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

The topic ‘Personalized CSS’ is closed to new replies.

 * ![](https://ps.w.org/wptelegram-widget/assets/icon-256x256.png?rev=2505671)
 * [WP Telegram Widget and Join Link](https://wordpress.org/plugins/wptelegram-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wptelegram-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wptelegram-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/wptelegram-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wptelegram-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wptelegram-widget/reviews/)

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [css](https://wordpress.org/support/topic-tag/css/)

 * 9 replies
 * 4 participants
 * Last reply from: [Michiel](https://wordpress.org/support/users/michiel/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/personalized-css/#post-15305954)
 * Status: resolved