By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,758 Members | 1,250 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,758 IT Pros & Developers. It's quick & easy.

Browser specific CSS files

P: n/a
Is there any way in asp.net 2.0 to say if this specific browser views my
site give them a CSS sheet that is specific for that browser?

like IE6 get its own, FF get its own, IE7 gets the one FF uses... something
like that... this is of course... for browser compatability

btw I am using ASP.NET 2.0's theme system for all my CSS right now...
Jun 20 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In article <#Q*************@TK2MSFTNGP02.phx.gbl>, Smokey Grindle
<no****@dontspamme.com> writes
Is there any way in asp.net 2.0 to say if this specific browser views my
site give them a CSS sheet that is specific for that browser?
Don't think so. One of the (few) drawbacks to themes is the lack of
control over which stylesheet files are served. Basically, it's all or
nothing.
like IE6 get its own, FF get its own, IE7 gets the one FF uses... something
like that... this is of course... for browser compatability


This is of course, bad CSS design. You should aim for one CSS file for
all browsers. You can include hacks and filters if you need to send
specific CSS to specific browsers, but this is a last resort and should
only be used if you are really, really certain that the effect cannot be
achieved without. It almost always can unless you are doing very
advanced CSS.

HTH

--
Alan Silver
(anything added below this line is nothing to do with me)
Jun 27 '06 #2

P: n/a
Make the text that contains the css filename a generic html control, with
the runat="server" name value pair, so it can be dynamicly set.

You may like to consider browser capability files, and control adapters.

Martin

"Alan Silver" <al*********@nospam.thanx.invalid> wrote in message
news:Uj**************@nospamthankyou.spam...
In article <#Q*************@TK2MSFTNGP02.phx.gbl>, Smokey Grindle
<no****@dontspamme.com> writes
Is there any way in asp.net 2.0 to say if this specific browser views my
site give them a CSS sheet that is specific for that browser?


Don't think so. One of the (few) drawbacks to themes is the lack of
control over which stylesheet files are served. Basically, it's all or
nothing.
like IE6 get its own, FF get its own, IE7 gets the one FF uses...
something
like that... this is of course... for browser compatability


This is of course, bad CSS design. You should aim for one CSS file for all
browsers. You can include hacks and filters if you need to send specific
CSS to specific browsers, but this is a last resort and should only be
used if you are really, really certain that the effect cannot be achieved
without. It almost always can unless you are doing very advanced CSS.

HTH

--
Alan Silver
(anything added below this line is nothing to do with me)

Jun 27 '06 #3

P: n/a
In article <uF**************@TK2MSFTNGP03.phx.gbl>, Martin <x@y.z>
writes
Make the text that contains the css filename a generic html control, with
the runat="server" name value pair, so it can be dynamicly set.
Why bother, themes do all that for you.
You may like to consider browser capability files, and control adapters.
He would still be better off considering better CSS!! No amount of
hacking is going to cover up for good coding.
Martin

"Alan Silver" <al*********@nospam.thanx.invalid> wrote in message
news:Uj**************@nospamthankyou.spam...
In article <#Q*************@TK2MSFTNGP02.phx.gbl>, Smokey Grindle
<no****@dontspamme.com> writes
Is there any way in asp.net 2.0 to say if this specific browser views my
site give them a CSS sheet that is specific for that browser?


Don't think so. One of the (few) drawbacks to themes is the lack of
control over which stylesheet files are served. Basically, it's all or
nothing.
like IE6 get its own, FF get its own, IE7 gets the one FF uses...
something
like that... this is of course... for browser compatability


This is of course, bad CSS design. You should aim for one CSS file for all
browsers. You can include hacks and filters if you need to send specific
CSS to specific browsers, but this is a last resort and should only be
used if you are really, really certain that the effect cannot be achieved
without. It almost always can unless you are doing very advanced CSS.

HTH

--
Alan Silver
(anything added below this line is nothing to do with me)



--
Alan Silver
(anything added below this line is nothing to do with me)
Jun 27 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.