CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: Date Entered: 12/19/2005 8:29:54 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 5 Views: 47 Favorited: 0 Favorite
6 Items, 1 Pages 1 |< << Go >> >|
"wdaunheimer" <
NewsGroup User
Designating media type in CSS with Themes12/19/2005 8:29:54 PM

0

Hi, I'm having trouble figuring out how/where to put info in to tell asp.net 2.0 to use a print style sheet if the media is print and the regular stylesheet if the media is screen.  Previously, when we put the stylesheet link directly into the page settings, we would use code like the following:

<html>
<head>
    <title>My Title</title>
    <link href="MyStyle.css" rel="stylesheet" type="text/css" media="screen">
    <link href="Print.css" rel="stylesheet" type="text/css" media="print">
</head>

The style would then be applied appropriately, with the Print.css style used if the user was doing print preview or printing, and the MyStyle.css style for viewing on screen.

How would I do this with Themes?  I'm a little lost here, any help is appreciated.  :)

"orzeh" <>
NewsGroup User
Re: Designating media type in CSS with Themes12/20/2005 9:50:23 AM

0

hello,

in your stylesheets add this:

@media print
{
}

@media screen
{
}


code less, think more!
"wdaunheimer" <
NewsGroup User
Re: Designating media type in CSS with Themes12/20/2005 3:38:00 PM

0

Thanks!  I've read about that, but was hoping for a solution that didn't require adjustment to the actual stylesheet.  I appreciate your help, though, and will probably go with this option if I can't find a way to designate the media type in the asp.net page itself.
"ausideveloper"
NewsGroup User
Re: Designating media type in CSS with Themes12/7/2006 5:09:02 AM

0

This is a brillint solution, thanks very much. I spent at least 3 hours trying to figure out how to fix this issue.

"Adam.Kahtava"
NewsGroup User
Re: Designating media type in CSS with Themes12/7/2006 1:38:39 PM

0

Through compilation logic, ASP.NET 2.0 Themes includes all CSS files from the current App_Theme directory as external CSS links.

This can be overridden, but requires a great deal of work. 

An easy solution is to remove your CSS files from the App_Theme directory (place them somewhere in the site root), then explicitly link to your CSS through the Head of the Master Page or your .aspx pages. This allows you to regain the CSS functionality that Themes otherwise comprimises.

The following CSS functionality is compromised by Themes:

  1. CSS media types
  2. The CSS @Import rule
  3. The CSS @Media rule
  4. Preferred and alternate style sheets
  5. Media-dependent cascades
  6. Inheritance and cascading
  7. The use of Microsoft's Conditional Comments

While the solution provided in this thread works around a Design Flaw in Themes, it doesn't scale well for large web applications with complex CSS files.


-Adam Kahtava [http://adam.kahtava.com]
"Mainship" <>
NewsGroup User
Re: Designating media type in CSS with Themes1/20/2008 8:59:51 PM

0

The links you offered were very helpful, thank you!

Diane 

6 Items, 1 Pages 1 |< << Go >> >|


Free Download:













vmware server

links in simba show old ip address

nows sbe2 - install questions/issues

nows sbs v2.5 announced

nows sbe 2 - how to fix unsupported state

nows sbe2 and sled 11

nows sbe 2.5 beta

edirectory install installs, then starts again

nowssbe groupwise woes

backup options

nothing works with nows in xen

iprint client install dependency failure

getting activated / subscription

zenworks cm on sbe2

nows sbe@ vs nw 6.5 sbe

time problem with nows on vmware

how to get access to nows sbe starter pack

help with ows small business eval

remote manager login

problems with multiuser file share

two servers: what? where?

dynamic local user

next verison of open workgroup suite small bussiness edition

remember the days when everyone here rubbished nt

problem with using 2 nics, one public one private

nows sbe future

possible to boot with no gui?

sbe 2.5

nici install problem + nds 255 error

backup - amanda nows sbe 2

noes sbe 2.5 documentation issues!

nows-sbe2 next version

issues with embedded raid controller hp ml110 and nowssbe

multiple servers, id admin: no such user, simba updated

nows - training

upgrading to nows sbe 2.5 readme

nss - samba required?

move services container

partitioning nows sbe 2.5

two nows sbe systems in same tree. oops!!!

cannot find nwraid module when starting nss

nows-sbe2 backup

dhcp/dns locator objects/scope settings

license key for evaluation missing

burn new boot dvd with latest updates

unable to set delete inhibit

resellers ...how to make money at the expense of novell

nows sbe and nss

updates

nows sbe 2.5 is available on download.novell.com

   
  Privacy | Contact Us
All Times Are GMT