-3

A file / web page contents the following attached external cascading style sheets

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="css/a.css" rel="stylesheet" type="text/css" />
<link href="css/b.css" rel="stylesheet" type="text/css" />
<link href="css/c.css" rel="stylesheet" type="text/css" />
<link href="css/d.css" rel="stylesheet" type="text/css" />
</head>

If I want to use multiple browsers specific conditional statements for a.css only among all the style sheets, how the other style sheets like b.css, c.css and d.css should be placed withing the head tag?

Thanks,

1

2 Answers 2

0

The answer could be as simple as

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="css/a.css" rel="stylesheet" type="text/css" />
<!--[if IE ]>
<link href="/css/[email protected]" rel="stylesheet" type="text/css">
<![endif]-->
<link href="/css/[email protected]" media="screen and (-webkit-min-device-pixel-ratio:0)" rel="stylesheet" type="text/css" />
....and so on
// Other external css files shall go below this line within the head tag
<link href="css/b.css" rel="stylesheet" type="text/css" />
<link href="css/c.css" rel="stylesheet" type="text/css" />
<link href="css/d.css" rel="stylesheet" type="text/css" />
</head>

For some unknown reasons my browsers on local host were ignoring the other css files below the conditional comments which is not countable at all for the right answer.

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

Comments

0

Use conditional comments like so...

<!--if [browser-specific condition statement/s]>
<link href="css/a.css" rel="stylesheet" type="text/css" />
<![endif]-->

Inject the conditions as you require.

4 Comments

I know that. My question was where the other external css files go within the head tag?
The answer is yes. Just inject the conditional comments, wrap whichever css you wanted to effect. Fyi, the conditional comments can be placed anywhere inside the whole HTML document.
You don't read my question carefully before you make the first reasonable answer. Not even now. This conditional statement ignores the other css files. My question was how to confine the conditions within a.css only among different browsers that don't affect the other css files.
Your question is actually vague, and needs a lot of improvement, be more technical. I will leave this question to the other users who have the greatest patience in the world.

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.