• Resolved Connor Crosby

    (@ccmovies)


    I am making a WordPress theme and I brought all the code over to an index.php and style.css file in a theme folder. The problem is that the CSS code is not effecting the HTML and PHP. It looks as if it is unstyled (browser default). I checked the <head> and it shows the link to the stylesheet.

    Here is the code I used to link to the stylesheet:
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

    When I go to the stylesheet link, it only shows the commented area information (name, description, URI, etc), but when I go to my coding software it shows up fine. And yes, I am looking at the online version, not offline.

    What could make this happen? I have tried everything I can think of. Please help!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Have you tried validating your CSS?

    Thread Starter Connor Crosby

    (@ccmovies)

    It shows a couple of errors, but wouldn’t it still at least show some elements. Here is the link by the way.

    https://connorcrosby.net

    You need to sort out the first two errors. They may stop parts of the CSS working in its tracks. You’ve also got some markup errors that need sorting.

    There’s definitely a problem in the style.css file. I can’t access anything beyond the comment heading. What are you using to create the file? Is the file being saved with the correct file type encoding?

    Thread Starter Connor Crosby

    (@ccmovies)

    Oh nevermind. When I updated my site (deleted a post) it shows the site normally, plus the CSS file updated.

    Thread Starter Connor Crosby

    (@ccmovies)

    You were viewing that when I deleted a couple lines of code to see if that would correct the problem, that is why there were errors. I know there is still some left, but I will fix that later.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘CSS Not Working’ is closed to new replies.