473,770 Members | 5,977 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mulriple CSS files for multimple browsers - your comments

Hello all

A new standards based and CSS designed site I recently completed is
soon to go live.

After much testing and tweaking I have fianlly managed to get the site
to look as it should on most browsers on PC, Mac, Unix and Linux
systems. The downside was that I had to use PHP (to detect browser/CSS)
and many CSS files which were tweaked - one for each browser on each
platform and it resulted in quite a few CSS files.

This was the only sensible approach/solution at the time.

I am just interested to know what other peoples views are on this? Im
sure many of you have had to do the same thing as no matter
how hard you try to limit the number of CSS files it just isnt
realistic at this present time.

Have any of you done similar things? Any alternative solutions that
worked or which were effective?

Please discuss.

Many thanks
Chris

Jul 21 '05
19 2884
In article <11************ **********@c13g 2000cwb.googleg roups.com>, absc04
@bangor.ac.uk enlightened us with...

A new standards based and CSS designed site I recently completed is
soon to go live.

After much testing and tweaking I have fianlly managed to get the site
to look as it should
As it *should*?

I bet I break the layout in 3 seconds by increasing the font size on you. ;)
If I can't increase the size as large as I need to, your site is no good to
the visually impaired.
Oh, and you don't *know* what browser I'm using. The string I send to the
server (user_agent) is very fragile and easily modified. Heck, I can fool
Google into thinking I'm using IE when I'm not even using a browser (it won't
let you go right to seach without a user_agent). Opera regularly makes other
sites think it is IE.

I am just interested to know what other peoples views are on this?
If you need that many style sheets for different browsers, you're (or your
client is) expecting too much for the web. Perhaps Flash or an applet would
be more what was in mind. Something that only works for people with browsers
and looks the same every time. Too bad it also doesn't index -- so search
engines won't find it. Not to mention all the other problems with Flash and
applets.

People can use their own style sheets if they don't like yours.
If your site breaks with CSS turned off, you're in trouble when users with
disabilities (or just a strong hatred of the color yellow or something) try
to use your site.
Some sites (personal pages, like LiveJournal) don't have to worry about that.
Most either do or should (but aren't).

Keep in mind that browsers are not the only user agents that can access the
web.
Have any of you done similar things? The only time I needed a separate sheet for a browser was back when I had to
support netscape 4. And what I did was to not give that browser a sheet at
all.
Javascript is a whole 'nother can of worms.
Any alternative solutions that
worked or which were effective?


Make an HTML page of pure markup with no formatting AT ALL. No style. No CSS.
No font tags. Nothing.
That's how it might "look" to someone, including search spiders, PDAs, speech
browsers for the blind, and when someone is surfing with their own CSS sheet.
When it works like that, THEN make it pretty. :)

Oh -- and some of us surf with images turned off and/or with ads redirected
through 127.0.0.1 with Firefox. *heh*

--
--
~kaeli~
A boiled egg in the morning is hard to beat.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 21 '05 #11
"Unknown User" <me@privacy.net > wrote:
On Mon, 31 Jan 2005 14:30:15 -0600, kchayka <us****@c-net.us> wrote:
Browser sniffing is doomed to failure.
Indeed, it only creates problems, not solves them.


I agree, but what will happen when next year Microsoft releases IE7 with
the new release of Windows?


Current bets are mostly on their being little improvement to the CSS
support...

Hacks that distinguish between latest versions and older versions
(i.e. the box model hack that distinguishes between IE5 and IE6)
should be safe.

Hacks that distinguish between latest versions of different browsers
are more problematic. e.g. using attribute selectors to distinguish
between IE5/6 and Mozilla, etc. If IE7 supports attribute selectors
but still doesn't support height/min-height properly then a lot of
pages will break.
What if the box-model bug is solved and IE treats the box model properly?


It already does. IE6 gets the box model correct unless you trigger
quirks mode.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
Jul 21 '05 #12
Unknown User wrote:
On Mon, 31 Jan 2005 14:30:15 -0600, kchayka <us****@c-net.us>
wrote:
Browser sniffing is doomed to failure.
Indeed, it only creates problems, not solves them.


I agree, but what will happen when next year Microsoft releases IE7
with the new release of Windows? What if the box-model bug is
solved and IE treats the box model properly?


Do you really think they can do that?
Then the box model hack will turn web sites ugly? These are just
some thoughts...


So design your sites so they do not depend on pixel-perfect layout.
<g> My sites all seem to work just fine in your graphical browser,
your text browser, your speech browser, your PDA or mobile phone, and
yes, even in a Redmondian operating system component.

--
-bts
-This space intentionally left blank.
Jul 21 '05 #13
On 31 Jan 2005 08:07:01 -0800, "Chris" <ab****@bangor. ac.uk> wrote:
A new standards based and CSS designed site I recently completed is
soon to go live.
After much testing and tweaking I have fianlly managed to get the site
to look as it should on most browsers on PC, Mac, Unix and Linux
systems. The downside was that I had to use PHP (to detect browser/CSS)


IF you are using server side PHP to "sniff" for browsers, your method is
dead from the start.

There _is_no_way_ to reliably separate one browser request from another
when said request appears at the server.

--
Rex
Jul 21 '05 #14
On Mon, 31 Jan 2005, Chris wrote:
After much testing and tweaking I have fianlly managed to get the
site to look as it should on most browsers on PC, Mac, Unix and
Linux systems. The downside was that I had to use PHP (to detect
browser/CSS)
I'm sorry to have to say this, but that was a completely
counterproducti ve waste of time. Not only does it not work (in any
real sense), but it'll have serious effects on cacheability.
and many CSS files which were tweaked - one for each browser on each
platform and it resulted in quite a few CSS files.
Painful. And when the dozens of different browsers on the campus of
..gla.ac.uk all access your site via the campus web cache, what's going
to happen?
This was the only sensible approach/solution at the time.


It never was, at any time. You'd have done much better to ask here
first, than to waste all that effort on a dead-end and only then to
ask the group's opinion. So sad.

There are recognised tricks to capitalise on bugs in old browsers and
thus protect them from harming themselves. Beyond that, you can and
should rely on techniques of flexible design to adapt to different
browsers. Is the best advice that I can offer you.

Try http://w3development.de/css/hide_css_from_browsers/ for a start.

Good luck
Jul 21 '05 #15
"Chris" wrote in comp.infosystem s.www.authoring.stylesheets:
The downside was that I had to use PHP (to detect browser/CSS)
and many CSS files which were tweaked - one for each browser on each
platform and it resulted in quite a few CSS files.

This was the only sensible approach/solution at the time.


I'm speechless.

If your design is so elaborate that it doesn't look decent in
the major browsers, IMHO it's too elaborate. I don't say it
will look the same in all -- even if it did on your machine it
wouldn't on others because users choose different fonts and
text sizes. But it's a reasonable goal that it look decent
in all.

--

Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
Jul 21 '05 #16
Thanks to all who have provided your imput and comments. Some useful
and some not so...but all appreciated.

Chris
Stan Brown wrote:
"Chris" wrote in comp.infosystem s.www.authoring.stylesheets:
The downside was that I had to use PHP (to detect browser/CSS)
and many CSS files which were tweaked - one for each browser on eachplatform and it resulted in quite a few CSS files.

This was the only sensible approach/solution at the time.


I'm speechless.

If your design is so elaborate that it doesn't look decent in
the major browsers, IMHO it's too elaborate. I don't say it
will look the same in all -- even if it did on your machine it
wouldn't on others because users choose different fonts and
text sizes. But it's a reasonable goal that it look decent
in all.

--

Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/


Jul 21 '05 #17
I'm sorry to have to say this, but that was a completely
counterproducti ve waste of time. Not only does it not work (in any
real sense), but it'll have serious effects on cacheability.

No it wasnt - I learn along the way. :)

t never was, at any time. You'd have done much better to ask here
first, than to waste all that effort on a dead-end and only then to
ask the group's opinion. So sad.

Sad?!!

There are recognised tricks to capitalise on bugs in old browsers and
thus protect them from harming themselves. Beyond that, you can and
should rely on techniques of flexible design to adapt to different
browsers. Is the best advice that I can offer you

yes i understand - but the main reason I had to do separate css files
was due to the way different browsers render the box-model! Im not
alone is this and certainly nort sad!

Jul 21 '05 #18
Chris wrote:

the main reason I had to do separate css files
was due to the way different browsers render the box-model!


If you checked the archives, you would have seen this subject come up
numerous times over the past few years. There is no reason for separate
CSS files. There are many ways to hide CSS from selected browsers by
taking advantage of unsupported features or parsing bugs.

<URL:http://www.dithered.co m/css_filters/css_only/index.php>
<URL:http://centricle.com/ref/css/filters/>
<URL:http://w3development.d e/css/hide_css_from_b rowsers/>

And I suggest you get yourself a real newsreader and quit using google
groups to post. Your manual method of quoting leaves a lot to be
desired. If your ISP's news service sucks, then sign up at:
<URL:http://news.individual .net/>

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #19
Browser sniffing is doomed to failure. Indeed, it only creates problems, not solves them.
I agree, but what will happen when next year Microsoft releases IE7
with the new release of Windows? What if the box-model bug is
solved and IE treats the box model properly?
Beauregard T. Shagnasty wrote:
Do you really think they can do that?
Of course, they can do that. They can do it right, just as well as, they
can do it wrong. ;-)

Truth is, there will be NO Internet Explorer 7. Not even any
fixes/enhancements to IE 6. They have broken up their Internet Explorer
development team and spead them out to various parts of the company.

Longhorn will handle web browsing with a new improved product. I believe
they have drawn a line in the sand and will handle browsing from
Longhorn in a responsible, web standards adhering, way. All they need do
is allow an old version of IE run in Longhorn to handle all the kludgie
stuff so if someone absolutely... positively... has to have the the old
crap they can have it. But for the vast majority... the new 'integrated
browser' will be more than adaquate. Also if there are sites which need
to be tweaked to run 'correctly enough' to work in Longhorn... they will
be tweaked to run in Longhorn.
Then the box model hack will turn web sites ugly? These are just
some thoughts...


The box model hack will be handled seamlessly. (just my prediction)
So design your sites so they do not depend on pixel-perfect layout. <g>
My sites all seem to work just fine in your graphical browser, your text
browser, your speech browser, your PDA or mobile phone, and yes, even in
a Redmondian operating system component.


As, well as they will run in Longhorn... (Am I not right???) ;-)

Thanks...

Rich
Jul 21 '05 #20

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

Similar topics

2
14169
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip Smarty-2.6.7.tar.gz on a system running WindowsXP SP2. Apache and PHP tested out fine. After adding Smarty, I ran the following http://localhost/testphp.php
11
2803
by: Dan Rubin | last post by:
HI everyone, lurking for a long time here, since I can usually solve my own problems, but here is one I'm stumped by. I've got a valid XHTML 1.0 Transitional layout, and all the CSS is valid as well (plenty of warnings, but I'm not worried about that), and I'm making use of the float property without any problems EXCEPT for one page (coloured backgrounds added for clarity): http://autographquartet.com/contact.php
4
1891
by: Jan Steffen | last post by:
Hello everyone, I want to make all links to external sites or special resources (pdf, mailto-links, etc) easily recognizable for all users. Currently I use markup like <a href=".." class="extlink">External Link</a> and a CSS like ..extlink/* */ { background: transparent url(/link_out.gif) left center no-repeat; padding: 0 0 0 12px;
5
5210
by: joaopedrogoncalves | last post by:
Hi, I want to load an external javascript file, get its results and stick them inside a <div> block. I also want to do this in several places on a web page. This way the browser doesn't have to wait for the external resource to load to show up the page, thus giving a perceiving faster load time for the user.
6
2881
by: Jamal | last post by:
I am working on binary files of struct ACTIONS I have a recursive qsort/mergesort hybrid that 1) i'm not a 100% sure works correctly 2) would like to convert to iteration Any comments or suggestion for improvements or conversion to iteration would be much appreciated
2
1387
by: John C | last post by:
I understand how to comment C# source with XML comments, and generate these to an output file. There must be a set of available tools to then take all these XML files and generate a fully formatted and indexed series of HTML files for access through Web browsers. Can someone provide some references?? Thanks
77
4527
by: VK | last post by:
Randy Webb wrote: > VK said the following on 5/2/2006 9:48 AM: > > If you mean "trying to render it" then FF behavior is the same as for > > all other UA's willing to be in use (and not W3C demos). If document is > > served as text/html, FF will render it somehow anyhow. > > So you are saying it totally disregards the DTD and any hints from the > server how to handle the document? Except server reported Content-Type (text/plain,...
13
4901
by: anil.rita | last post by:
When the user chooses an AV file to play, based upon the type of file, I want to use the default installed media player to play it. I am wondering if this is a good way - any alternatives, suggestions or improvements? if( wmv file) document.write("<OBJECT id=Player classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 height="354" width="479">
18
34816
jhardman
by: jhardman | last post by:
Have you ever wanted to upload files through a form and thought, "I'd really like to use ASP, it surely has that capability, but the tutorial I used to learn ASP didn't mention how to do this."? Have you looked around trying to find simple solutions but didn't want to wade through pages of complex code? Have you balked at paying for premade solutions that are probably overkill for your particular project? I'd like to walk you through the...
0
9592
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
9425
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
10059
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
9871
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...
1
7416
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
5452
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3972
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
2
3576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2817
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.