473,698 Members | 2,426 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<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 6685
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************ ********@rwcrns c52.ops.asp.att .net> in
comp.infosystem s.www.authoring.stylesheets, Brian
<us*****@juliet remblay.com.inv alid-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************ ********@rwcrns c52.ops.asp.att .net> in
comp.infosystem s.www.authoring.stylesheets, Brian
<us*****@juliet remblay.com.inv alid-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********@new s.sihope.com> in
comp.infosystem s.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
4735
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" content="text/html; charset=ISO-8859-1" />
1
2945
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 happy to hear your advice on a couple of practicalities. 1. media="all" required? In the <head> of my pages, I have the following: <link rel="stylesheet" href="style.css" type="text/css"></link>
11
1918
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 stylesheet, then write specializations for media that need special treatment: <link ... media="all">
6
1718
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" type="text/css" href="layout.css" /> Thanks,
2
1842
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 images/media uploaded by admins, but also by members (in forum and blogs and such). Nothing strange about that at all. But now I'm faced with the need of moving - physically - all my media to a separate server, for distributed loads. I.e. when...
4
4445
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 Song</title> <link>http://www.feedforall.com/songs.htm</link> <description>FeedForAll cool show tunes and lyrics. </description>
0
2035
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" xmlns:media="http://search.yahoo.com/mrss/"> <channel> <title>Song Site</title> <media:title type="plain">TitleOfMedia</media:title> <link>http://www.foo.com</link> <description>Songs galore at different bitrates</description>
0
1585
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" xmlns:media="http://search.yahoo.com/mrss/"> <channel> <title>Song Site</title> <media:title type="plain">TitleOfMedia</media:title> <link>http://www.foo.com</link> <description>Songs galore at different bitrates</description>
0
1580
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" xmlns:media="http://search.yahoo.com/mrss/"> <channel> <title>Song Site</title> <media:title type="plain">TitleOfMedia</media:title> <link>http://www.foo.com</link> <description>Songs galore at different bitrates</description>
3
5684
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 those commands, and so on, just like my multimedia keyboard does. I can't find any way to do this. I have tried sending: System.Windows.Forms.Keys.MediaPlayPause, System.Windows.Forms.Keys.MediaPreviousTrack, ect. but it didn't do anything. Is...
0
8675
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8604
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9160
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8862
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7729
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6521
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.