How to add extra .css to wordpress? (2 posts)

  1. FunGuy
    Posted 5 years ago #


    I checked my blog on tablets and netbooks and it looked a bit bad, so I made an extra css and added to header.php in between

    <link media="all and (min-width: 481px) and (max-width: 768px)" type="text/css" rel="stylesheet" href="tablet.css">

    but nothing happens. How to add an extra .css to make this work? Thanks!

  2. Drew Jaynes
    Docs Czar
    Posted 5 years ago #

    The tablet.css file should be located in your theme's root directly and the href should look like this:

    href="<?php bloginfo('template_directory'); ?>/tablet.css"

    If you're using a child theme, you would change template_directory to stylesheet_directory

    You can use the bloginfo Codex page for reference.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.