473,397 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

<link media="screen"> and @media all

The page
http://w3development.de/css/hide_css...rowsers/media/
suggests using
@media all {
}
around rules to hide them from older browsers.

Suppose the above occurs in a style sheet that was linked from my
HTML via
<link media="screen" ...>

Does this create any problem. It would seem logical to me that
"@media all" is completely transparent to a user-agent that
understands it, regardless of any media specification on the <link>
tag that got us to this stylesheet in the first place.

Ai-je raison?

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #1
5 6667
Stan Brown wrote:
The page
http://w3development.de/css/hide_css...rowsers/media/
suggests using
@media all {
}
around rules to hide them from older browsers.
Including MSIE 5/Mac, which is really quite good at css. So use with
caution.
Suppose the above occurs in a style sheet that was linked from my
HTML via
<link media="screen" ...>

Does this create any problem. It would seem logical to me that
"@media all" is completely transparent to a user-agent that
understands it, regardless of any media specification on the <link>
tag that got us to this stylesheet in the first place.

Ai-je raison?


Peut-etre. I'd think that only a screen ua would look in the linked
stylesheet. When it sees the @media all rule, it will of course look
inside. But no other type of agent should see it in the first place.
Is that what you meant?
--
Brian
follow the directions in my address to email me

Jul 20 '05 #2
In article <kz********************@rwcrnsc52.ops.asp.att.ne t> in
comp.infosystems.www.authoring.stylesheets, Brian
<us*****@julietremblay.com.invalid-remove-this-part> wrote:
Stan Brown wrote:
The page
http://w3development.de/css/hide_css...rowsers/media/
suggests using
@media all {
}
around rules to hide them from older browsers.


Including MSIE 5/Mac, which is really quite good at css. So use with
caution.


So what's a boy to do? I've been experimenting off and on for months
now, and I don't feel any closer to a workable solution. I spent
hours and hours trying to use positioning in MSIE4 before finally
concluding it could not be made to work, so MSIE4 has to be screened
out.

I _really_ don't want to get into rule-by-rule analysis and start
using the invalid-charactrs hack on selected rules. Do you have a
viable and fairly simple recommendation?

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #3
Stan Brown wrote:
Brian wrote:
Stan Brown wrote:
@media all { }
around rules to hide them from older browsers.


Including MSIE 5/Mac, which is really quite good at css.


So what's a boy to do?

I _really_ don't want to get into rule-by-rule analysis and start
using the invalid-charactrs hack on selected rules. Do you have a
viable and fairly simple recommendation?


I use the import trick. Not in the style declaration, but in the
linked stylesheet.

<LINK REL="stylesheet"
MEDIA="screen"
HREF="css/brian.css"
TYPE="text/css">

In brian.css is the rule

@import "screen.css" ;

Note that other import syntaxes, while conforming, don't work, in
particular with IE/Mac.

This is the best method that I've come up with, but leaves one with a
nearly empty stylesheet. In other words, I don't like it; I'd like to
use something else; but everything else seems worse.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #4


Stan Brown wrote:
In article <kz********************@rwcrnsc52.ops.asp.att.ne t> in
comp.infosystems.www.authoring.stylesheets, Brian
<us*****@julietremblay.com.invalid-remove-this-part> wrote:
Stan Brown wrote:
The page
http://w3development.de/css/hide_css...rowsers/media/
suggests using
@media all {
}
around rules to hide them from older browsers.


Including MSIE 5/Mac, which is really quite good at css. So use with
caution.


So what's a boy to do?


<URL:http://accessat.c-net.us/articles/hide-css_p4.html>

--
To email a reply, remove (dash)un(dash). Mail sent to the un
address is considered spam and automatically deleted.
Jul 20 '05 #5
In article <3f********@news.sihope.com> in
comp.infosystems.www.authoring.stylesheets, kchayka <kcha-un-
yk*@sihope.com> wrote:
Stan Brown wrote:
So what's a boy to do?
<URL:http://accessat.c-net.us/articles/hide-css_p4.html>


Thanks to you and Brian for your comments. I'm not sure I'm ready to
go to such extremes. At this point I'm leaning toward just writing
valid CSS and letting the chips fall where they may, but I want to
think about it some more.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Alun | last post by:
I am trying to use the import method of attaching stlyesheets but I'm getting strange results. this is the code I'm using... <head> <title>CSS Example</title> <meta http-equiv="Content-Type"...
1
by: Garmt de Vries | last post by:
For a long time, I've used CSS to style my webpages, but only for media "screen" and "print". Now I've started looking into styling them for other media like "projection" and "handheld". I'd be...
11
by: Wolfgang Meier | last post by:
Hi, I really hope I'm not hitting a frequently asked question here, because I think almost every author must have made that decision. Anyway, here goes: Would it be better to write one global...
6
by: dubing | last post by:
Hello everyone, If media is not explicitly specified in link as shown below, what's the default media supposed to be, screen or all? I thought it should be 'all'. <link rel="stylesheet"...
2
by: Sandman | last post by:
Ok, so I'm the author of a pretty big CMS system (big as in huge, not market-share big) and I've been thinking about a problem for a few weeks here on media management. The CMS accomodates both...
4
by: subeen | last post by:
Hi, I am trying to parse a rss similar to the one found here (in example) http://www.feedforall.com/mediarss.htm <!-- Snipped for Brevity --> <item> <title>FeedForAll's Show Tunes and...
0
by: Konrad | last post by:
Hi everyone. I've got problem with converting xml file to xsd schema. The Xml file looks like: <?xml version="1.0" encoding="iso-8859-2"?> <rss version="2.0"...
0
by: kplazinski | last post by:
Hi everyone. I've got problem with converting xml file to xsd schema. The Xml file looks like: <?xml version="1.0" encoding="iso-8859-2"?> <rss version="2.0"...
0
by: kplazinski | last post by:
Hi everyone. I've got problem with converting xml file to xsd schema. The Xml file looks like: <?xml version="1.0" encoding="iso-8859-2"?> <rss version="2.0"...
3
by: hurricane_number_one | last post by:
I want to be able to play/pause/next/back the tracks in whatever media player app is running. So if iTunes is running, it will receive those commands, if Windows Media Player is, it will receive...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.