This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

ie.css changes

  • Creator
    Topic
  • #10401
    askwpgirl
    Participant

    Hi Jason,

    What is the best way to add ie specific styles to the child theme?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #10402
    askwpgirl
    Participant

    Figured it out, I think. Saw that you added some browser classes to the frontend.php file. Excellent!

    .ie8 .element {  
        margin-bottom: 15px;  
    }
    #10419
    Jason Bobich
    Keymaster

    Yeah, the browser classes are cool, eh?

    Here’s another way, just in general, to enqueue CSS files in a WordPress theme using classic IE conditional tags.

    function my_css() {
    	$GLOBALS['wp_styles']->add_data( 'my_ie_stylesheet', 'conditional', 'lt IE 9' );
    	wp_enqueue_style( 'my_ie_stylesheet', get_stylesheet_directory_uri() . '/ie.css' );
    }
    add_action( 'wp_enqueue_scripts', 'my_css' );
    #10435
    askwpgirl
    Participant

    cool

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.