In asp.net, .css file is encouraged to use?

G

Guest

Hi, friends,

In our ASP app, we have a lot of style definitions in our .css file. Now, in
asp.net, .css is encouraged to continue to use, or is better to be replaced
by something new in .net???

Any reference papers?

Thanks a lot.
 
T

Tim Cartwright

IMHO it is actually very good practice to combine the two, skinning, and
css. One of the nice things about using skinning and css, regardless of
whether or not if you only have one theme, is that you get WSIWYG if you set
the page.theme, and the page.stylesheettheme in the IDE. Not to mention the
fact that your css will automatically go in the <head> tag. I have actually
set both of these properties in my config as such :

<system.web>
<pages theme="default" styleSheetTheme="default" />

..... other config suff
</system.web>

Using the location element in the config, you can also change the theme per
file / directory. Or you could just over ride the theme in the page itself.
 
S

Scott Allen

Maybe some fine-tuning is needed for a true "cross-browser" experience?

All of the skin and theme work happens server side (see "Under the
Hood in http://odetocode.com/Articles/423.aspx). If doubt any cross-
browser issues are due to a deficiency in the theme/skin feature. I'd
suspect the problem is with styles or properties the desginer used in
a skin / theme.
 
J

Juan T. Llibre

re:
I'd suspect the problem is with styles or properties
the designer used in a skin / theme.

Two out out three browsers rendered correctly, while a third did not.

re:
All of the skin and theme work happens server side

There's some "fine-tuning" needed.

I checked the source for those tables for FF, IE and Opera and they're identical.

Maybe the issue is with Firefox not being identified correctly,
and therefore FF is not getting HTML it can understand well ?

FF *should* render standard HTML the same way IE and Opera render it.
Check out the source. I was surprised when I found them to be the identical.
 
K

Kevin Spencer

I haven't gone too deep into skinning.

You mean, you've only gone "skin-deep?"

--
;-),

Kevin Spencer
Microsoft MVP
..Net Developer
Complex things are made up of
Lots of simple things.
 
T

Tim Cartwright

Well, actually sometimes the issue with rendering to Firefox is that the
built in browscaps are outdated, and do not recognize FireFox as an uplevel
browser, so the asp.net engine outputs exactly what it thinks is the
appropriate html for Firefox. Read
http://www.asptoday.com/Content.aspx?id=2339 and
http://slingfive.com/pages/code/browserCaps/ for more info.

Juan T. Llibre said:
re:
I'd suspect the problem is with styles or properties
the designer used in a skin / theme.

Two out out three browsers rendered correctly, while a third did not.

re:
All of the skin and theme work happens server side

There's some "fine-tuning" needed.

I checked the source for those tables for FF, IE and Opera and they're
identical.

Maybe the issue is with Firefox not being identified correctly,
and therefore FF is not getting HTML it can understand well ?

FF *should* render standard HTML the same way IE and Opera render it.
Check out the source. I was surprised when I found them to be the
identical.
 
J

Juan T. Llibre

re:
Read

Yes, I've recommended those very same links, many times, here.

That's what I implied in this statement :
Maybe the issue is with Firefox not being identified correctly,
and therefore FF is not getting HTML it can understand well ?




Tim Cartwright said:
Well, actually sometimes the issue with rendering to Firefox is that the built in
browscaps are outdated, and do not recognize FireFox as an uplevel browser, so the
asp.net engine outputs exactly what it thinks is the appropriate html for Firefox. Read
http://www.asptoday.com/Content.aspx?id=2339 and
http://slingfive.com/pages/code/browserCaps/ for more info.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
ClayE7480

Latest Threads

Top