1

I need help. This is ridiculous.

I'm using Komodo IDE, version 7.1.2, and Firefox version 15.0.1.

I created an HTML5 file like so:

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<meta charset="utf-8" />

<title>Web Page</title>

<link rel="stylesheet" type="css/text" href="css/global.css" />

</head>

<body>

<div id="release">Release Date</div>

</body>

</html>

And the global stylesheet contains this and is located in a directory at the same level as the HTML file called css:

#release {
    text-align: center;
    font: small-caps;
    border-top: solid 1px;
    border-bottom: solid 1px;
    border-right: solid 10px;
}

Here is a picture of the directory structure:

enter image description here

I put the same styling into he HTML file and it works, but the styling isn't working with the external stylesheet. I am not new to website development, so this is particularly puzzling to me.

I tried this same thing on two Windows 7 machines and one Ubuntu 11.10 machine as well, with the same anomaly.

Here is the fiddle working:

http://jsfiddle.net/NKq8N/1/

What could be causing this?

1 Answer 1

3

In the <link> attribute, the type should be "text/css", not "css/text".

Sign up to request clarification or add additional context in comments.

3 Comments

Dude! Thanks. Sometimes it's just the stupid little things. I think I was hornswaggled because my IDE auto-filled it for me. I should look into that.
So the next question is why does jsfiddle.net accept this but not browsers? Just curious. I mean, other than it being incorrect ;--)
Because to jsFiddle, the stuff you put in the "CSS" tab is read as if it were inline. You don't need to define a <link> in the jsFiddle because the CSS tab is automatically connected to the page. Same thing with the JavaScript tab, all the code in that part is read as an inline <script> tag. You can even inspect the HTML in that frame, it will show your code in an inline <style> tag.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.