• Resolved becky01

    (@becky01)


    Hi, everyone,
    I’m really new to WP so forgive me if this question sounds basic. I was trying ot make a template for myself that matched my website https://www.runjeeta.com I thought i was doing pretty well, and everything looked ok when i looked at the blog and updated as I changed the files. BUT!WP keeps saying that my theme is broken and that its missing a style sheet. I don’t know why…
    First of all, i had my word press template linked to the css file for my whole site, runjeeta.css and it seemed fine and then it stopped working.
    So i moved runjeeta.css to my theme folder and re-linked. That didn’t work
    Then I changed the css file name to Style and changed the link again.
    currently I have this: <link href=”style.css” rel=”stylesheet” type=”text/css” /> as my link….and…..it’s not working. My css nav bar is gone, even my footer is gone! Why is this?

    Incase anyone is curious Iwas using this site: https://www.jonathanwold.com/tutorials/wordpress_integration/ for my tutorial. It seemed good, but i dont’ understand why my page isn’t connecting right with my CSS.

    I would love some help,
    Thanks, Becky01

Viewing 8 replies - 1 through 8 (of 8 total)
  • Is your stylesheet named style.css or Style.css? They aren’t necessarily the same….

    and there has to be some information in the top of the stylesheet that wp can read. Take a look at the commented section in the top of the default theme stylesheet.

    Thread Starter becky01

    (@becky01)

    I ment style.css. I always try to remember to do these things in lowercase. I’ll take another look at the commented section, but I dont understand why the comments matter, on a functionality level.

    becky01

    Working now? When I visit runjeeta.com, I see a site design, complete with graphics and all, and https://www.runjeeta.com/runjeeta.css loads just fine. Is this still a problem or is it resolved?

    If it’s still a problem, can you point out what styles you’ve set up in the CSS that you do not see reflected on your site? I don’t know how you want things to look, so I have no way of knowing whether or not the CSS is working properly. Thanks.

    Thread Starter becky01

    (@becky01)

    I’m sorry! My blog is set up at https://www.runjeeta.com/word. I can’t believe i forgot to say the URL for the WP installation. sorry
    beckyo1

    No sweat. You’ll need to modify your header template for that theme.

    Your CSS link points to “https://www.runjeeta.com/style.css&#8221; which, of course, is a file that doesn’t exist. It should be “https://www.runjeeta.com/word/wp-content/themes/%5Binsert_theme_name%5D/style.css&#8221; and typically that’s taken care of automatically with this:
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    That puts in the path for the CSS.

    If you want to keep using that runjeeta.css file, just drop it into your template folder and rename it “style.css.” You could also try typing the direct path of the desired stylesheet into the “header.php” template instead of using PHP to automatically fill in the URL. So type in <link rel="stylesheet" href="https://www.runjeeta.com/runjeeta.css" type="text/css" media="screen" />
    Give either one of those a shot and see what happens.

    Thread Starter becky01

    (@becky01)

    Sweet success! Thanks for helping me. I guess I tried to “fix” it so much that I got confused. Also, i think trying to use relative paths weren’t so great. It totally works now. My next issue is to get my blue content border in the middle to wrap around all the text. ??

    That blue border does currently wrap around all the text (Mac OS X, Netscape 7.2), but I’ll save that CSS problem of yours for a posting on another forum or something.

    If you’re going to use this as a template for a client install, I suggest you go back to using “style.css” inside the template folder for your CSS, reverting back to using <?php bloginfo('stylesheet_url'); ?> in the CSS LINK tag. It will be easier for you to package this template as a proper template to apply to another version of WordPress. Right now, your call to a CSS file outside that template folder could prove to be a pain later on.

    Thread Starter becky01

    (@becky01)

    Hi! Thanks for the great advice. I think you are right about the css linking. This was a dry run for my site, but the template I’m making for my client is going to be different. But I agree with you. When I make his, I’ll use the style.css sheet in the folder.
    Thanks.
    becky01

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘CSS file linking problems’ is closed to new replies.