Hello
While googling for this topic I found lots of advice on how to use
@media rules to _hide_ stuff from Mac IE. Anyway, actually _using_
@media to write media specific CSS for both Win and Mac IE 5 seems to be
less covered. (I know Mac IE is dead, but some of my audiences possibly
still use older computers...)
So this is what I tried so far to apply specific style sheets for screen
and print:
<link rel="stylesheet " type="text/css" href="basic.css ">
<style type="text/css" media="screen">
@import url("screen.css ");
</style>
<style type="text/css" media="print">
@import url("print.css" );
</style>
It turned out that IE 5.x on Windows could not handle these (while Mac
IE 5 had no problem). So I changed it to:
<link rel="stylesheet " type="text/css" href="basic.css ">
<style type="text/css">
@import url("screen.css ");
@import url("print.css" );
</style>
and surrounded the codes in screen.css and print.css with @media
blocks. It works in Win IE 5.x like a charm, but now Mac IE 5 does not
recognize the styles anymore.
I tried versions with conditional comments; they do not work, as I can't
hide something from IE 5 while keeping it visible for non-IE browsers.
Using the link tag instead of @import has the downside to make the
stylesheets available for Netscape 4 and IE 4, that should actually only
see basic.css.
Is there any known way to apply media specific style sheets supporting
IE 5.x on both Windows and Mac?
Thanks for pointing me to the right direction...
Markus 3 1966
Markus wrote:
>
<style type="text/css">
@import url("screen.css ");
@import url("print.css" );
</style>
and surrounded the codes in screen.css and print.css with @media
blocks. It works in Win IE 5.x like a charm, but now Mac IE 5 does not
recognize the styles anymore.
MacIE does not support @media. You cannot make it do something it has no
understanding of. Even if you got it to recognize the rules at all, it
couldn't distinguish screen from print from any other media type and
would end up jumbling them all together.
Is there any known way to apply media specific style sheets supporting
IE 5.x on both Windows and Mac?
Personally, I see this as a huge waste of time and effort. IE 5.x
browsers have been pretty dead for a long time now. I suggest you let
them degrade gracefully and forget about trying to coerce them into
behaving like better browsers. Too frustrating for too little benefit.
My 2p.
--
Berg
Bergamot schrieb:
Markus wrote:
><style type="text/css"> @import url("screen.css "); @import url("print.css" ); </style>
and surrounded the codes in screen.css and print.css with @media blocks. It works in Win IE 5.x like a charm, but now Mac IE 5 does not recognize the styles anymore.
MacIE does not support @media. You cannot make it do something it has no
understanding of. Even if you got it to recognize the rules at all, it
couldn't distinguish screen from print from any other media type and
would end up jumbling them all together.
>Is there any known way to apply media specific style sheets supporting IE 5.x on both Windows and Mac?
Personally, I see this as a huge waste of time and effort. IE 5.x
browsers have been pretty dead for a long time now. I suggest you let
them degrade gracefully and forget about trying to coerce them into
behaving like better browsers. Too frustrating for too little benefit.
Thank you... I had made the effort 2 years ago and got nice results in
IE 5 on both Windows and Mac (before I added print versions, though...).
I was quite proud of that and it would have been somehow frustrating to
abandon it now :-).
Well, as I usually don't like "ugly" hacks, I had not given them too
much attention so far. Now I found that the Commented Backslash Hack
actually does the trick quite handily:
/*\*/
@media screen {
/**/
[css goes here]
/*\*/
}
/**/
So Mac IE 5 gets the screen css for all media, which is a quite
acceptable behaviour. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Stan Brown |
last post by:
The page
http://w3development.de/css/hide_css_from_browsers/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" ...>
|
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" />
|
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...
|
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">
|
by: Lonewolf |
last post by:
Hi everyone, pls forgive me for my lack of knowledge and skills if my
question sounds very stupid. I am trying to implement a video conferencing
software and I am currently looking at a few set of technologies, among them
WMP, RealMedia, H.323 and XviD (not sure if it is suitable for streaming
even) . I would like to seek the advice of those...
| |
by: Viken Karaguesian |
last post by:
Hello all,
I'm a little confused on how to implement @media to make some web pages
print better. From what I've been able to read so far, I need to set
the @media rules as the top items in my CSS. So I would write something
like (not sure of the formatting here):
@media print {
body { blah blah blah }; (does a semi-colon go here?)
|
by: Jarno Suni |
last post by:
I want a device to use styles given for media type handheld and not the
styles given for media type screen, if the device supports media types
handheld and screen. Is it possible without writing all styles specified
for screen again for handheld?
--
Homepage http://www.iki.fi/jarno.suni/
|
by: hzgt9b |
last post by:
Using VS 2003, VB.NET and/or ASP.NET 2.0,
BACKGROUND
I have a window forms based application that contains a TreeView control and
a WebBroswer (AxSHDocVw.AxWebBrowser) control. The TreeView is populated with
nodes that when clicked play an audio clip from specified local or web URL
and navigate the browser control to a specified local or...
|
by: Harlan Messinger |
last post by:
English Wikipedia allows registered users to define custom styles. I
created a set of styles inside a @media handheld wrapper to see if I
could override the default absolute positionings and floats of the major
page elements in IE on my Sony Treo with Windows Mobile 5.
Without the custom CSS, on both the regular computer and the handheld,...
|
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...
|
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...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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...
|
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...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |