Results 1 to 5 of 5
  1. #1
    ABW Ambassador
    Join Date
    June 30th, 2007
    Location
    Syracuse, NY
    Posts
    677
    Stupid question: How to call a style sheet? (sorry!)
    I'm building a website for a friend using php/css and thought she'd be able to use wordpress as a CM, seems she can't anymore. So, I'm going without it.. and don't know how to call the style sheet now, sad huh?

    In the header I find this code:
    Code:
    <style type="text/css" media="screen">
    		@import url( <?php bloginfo('stylesheet_url'); ?> );
    I'm guessing this calls it for Wordpress?

    Doesn't work without wordpress, so I'd be thankful for anyone who could explain what the right code to call it is. I tried google, but I guess this is too simple to find? LOL

    Sorry, and thanks.

  2. #2
    Resident Genius and Staunch Capitalist Leader's Avatar
    Join Date
    January 18th, 2005
    Location
    Florida
    Posts
    12,817
    I've got this on my fairly-basic sites:
    Code:
    <link rel="stylesheet" href="nameofcssfile.css" type="text/css">
    <style type="text/css">
    DreamWeaver set it up for me.

    Of course, you could use a PHP command to call it like WordPress did, but why bother...if you do it their way you also have to do extra steps to define a variable which has no need to be a variable in the first place.
    There is no knowledge that is not power. ~Hemingway

  3. #3
    ABW Ambassador Daniel M. Clark's Avatar
    Join Date
    January 7th, 2006
    Location
    Houston, TX
    Posts
    2,082
    Give this a shot:

    Code:
    <link rel="stylesheet" type="text/css" href="FULLPATH.css" />
    Make sure you put the full path to the stylesheet in there, i.e.
    Code:
    http://www.yourwebsite.tld/style/filename.css
    Hope that helps!

    Oh, and you're right, it wasn't working because it wasn't WP. That <?php call in there is a WP function.

  4. #4
    ABW Ambassador Daniel M. Clark's Avatar
    Join Date
    January 7th, 2006
    Location
    Houston, TX
    Posts
    2,082
    You can simply list the filename, but I don't recommend it because you're limiting yourself to putting your stylesheet in the top level directory of your site. If you enter the full path, you can put it anywhere you like. But yeah, it can work

  5. #5
    ABW Ambassador
    Join Date
    June 30th, 2007
    Location
    Syracuse, NY
    Posts
    677
    Thanks both of you. I did try it Leader's way first, and it works. Should work with yours too HecticDMC.

    Now I'm seeing there is a lot more PHP from wordpress I need to clean up, lol, but style sheet if loading! So a step closer.

  6. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Stupid Picture and Stupid Question
    By Bill in forum Greg Hoffman Consulting
    Replies: 1
    Last Post: April 20th, 2011, 07:56 PM
  2. Fine..Call me stupid, but I just noticed...
    By melty in forum Commission Junction - CJ
    Replies: 9
    Last Post: May 2nd, 2006, 01:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •