- This topic is empty.
-
AuthorPosts
-
January 9, 2011 at 2:27 pm #31193Jerm993Member
I’ve been looking at this code now for about an hour, and i just can’t seem to spot the issue here. My conditional stylesheet isn’t effecting any IE browser, i have 9 installed on my computer and i’m using IE tester.
...
....
That’s out of my header.php file, and here is the ie.css file, and yes the two css files are in the same folder.
/*******************************************************************************
Structure
*******************************************************************************/
a { color: #fff; }
.outter-wrap { margin: 0px 10px 0px 5px; }
.side-bar { margin: 15px 15px 15px 30px; }
If you want the entire header.php file, or the entire css file let me know and i’ll post it, shouldn’t be necessary i wouldn’t think.
Help me! I’m going CRAZY…
Thanks,
Jeremy CJanuary 10, 2011 at 4:37 am #66778TT_MarkMemberSorry, but I don’t think you’re linking to the same place for both stylesheets.
Knowing WP as much as I do (and I know nothing about WP), I somehow doubt that the CSS is in the folder that you are linking to. Preview the page in a browser, right click, View Source and check to see where the two stylesheets are pointing to.
For example, the bloginfo(‘stylesheet_url’) will return something like
http://example/home/wp/wp-content/themes/child-theme/style.css
January 10, 2011 at 10:17 am #66732gnoMemberI think the issue is with the href of your conditional style sheet.
You are pointing it at a “relative position” – “ie.css”.
If you are at http://www.example.com/about/ it will request the style sheet http://www.example.com/about/ie.css. If you are at http://www.example.com/blog/blogpostid/ it will request http://www.example.com/blog/blogpostid/ie.css
This is of course only the case if you use mod_rewrite on apache or similar customization of the URL. Which most wordpress-users seems to do.
If you change the href to /ie.css it will always look for the stylesheet in the root of your domain (www.example.com/ie.css) no matter what.
January 10, 2011 at 10:28 am #66714gnoMemberRemember, that the paths given in link or script tags in the header is given to the browser and then requested from the users location – its not just sent along with the file, as when you include stuff with a server side language. So, a path to a stylesheet or javascript file, should be the path to where it could be found on your webserver, or another webserver.
Depending on how you start the path, the browser will look different places:
/ means the root of your webserver
./ means the current directory (this is what the browser does when you only provide a filename)
http:// – will make the browser look at another domainTake a look on this – imagine its part of the head tag contents of a webpage located at http://www.example.com/hello/index.html
The first link tag refers to http://www.example.com/css/stylesheet.css
The second and third link tags refer to http://www.example.com/hello/css/stylesheet.css
The fourth obviously refers to http://www.example2.com/css/stylesheet.css
January 10, 2011 at 12:23 pm #66723clokey2kParticipantYou should be able to use the following if the files are contained in the same directory:
January 10, 2011 at 10:38 pm #66691Jerm993Memberohh sorry guys, i don’t know what was up with it, but it was in the same file and i even tried the template tags to link to it, the plain old ie.css was my last choice. I did however walked away from it for a day come back and it magically worked…. Just wasn’t holding my mouth right i guess.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.