Click here to Skip to main content
16,005,339 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: asp/ Ms access Pin
R. Giskard Reventlov10-Aug-07 4:28
R. Giskard Reventlov10-Aug-07 4:28 
GeneralRe: asp/ Ms access Pin
gavinleeburn10-Aug-07 5:44
gavinleeburn10-Aug-07 5:44 
AnswerRe: asp/ Ms access Pin
andyharman10-Aug-07 4:29
professionalandyharman10-Aug-07 4:29 
AnswerRe: asp/ Ms access Pin
Guffa10-Aug-07 6:07
Guffa10-Aug-07 6:07 
QuestionCSS problems Pin
matjame9-Aug-07 23:29
matjame9-Aug-07 23:29 
AnswerRe: CSS problems Pin
R. Giskard Reventlov10-Aug-07 0:58
R. Giskard Reventlov10-Aug-07 0:58 
GeneralRe: CSS problems Pin
matjame10-Aug-07 1:02
matjame10-Aug-07 1:02 
GeneralRe: CSS problems Pin
R. Giskard Reventlov10-Aug-07 1:25
R. Giskard Reventlov10-Aug-07 1:25 
You don't. Place them on the page in order of preference; in other words anything in the last file will take precedence over a file declared earlier as will any declaration you make in each file. Further if you have, for instance, markup like this:

...label cssclass="second first"...

The css in first will override anything similar in second. So second says that the text color should be red but first says it should be blue then first will win.

If you only want to use a css file depending on circumstances then you could do something like: (in master page)

<br />
		private void CreateMetaTags()<br />
		{<br />
			HtmlMeta htmlMeta = null;<br />
			HtmlHead htmlHead = (HtmlHead)Page.Header;<br />
<br />
			// Add the page/application title.<br />
			htmlHead.Title = ApplicationAttributes.AssemblyTitle;<br />
<br />
			// Add the Meta tags.<br />
			htmlMeta = new HtmlMeta();<br />
			htmlMeta.Name = "Content-Type";<br />
			htmlMeta.Content = "text/html; charset=utf-8";<br />
			htmlHead.Controls.Add(htmlMeta);<br />
<br />
			htmlMeta = new HtmlMeta();<br />
			htmlMeta.Name = "Description";<br />
			htmlMeta.Content = ApplicationAttributes.AssemblyTitle;<br />
			htmlHead.Controls.Add(htmlMeta);<br />
<br />
			htmlMeta = new HtmlMeta();<br />
			htmlMeta.Name = "Keywords";<br />
			htmlMeta.Content = ApplicationAttributes.AssemblyTitle;<br />
			htmlHead.Controls.Add(htmlMeta);<br />
<br />
			// Add the style sheets.<br />
			string strStyle = @"~/CSS/Screen.css";<br />
			HtmlLink htmlLink = new HtmlLink();<br />
			htmlLink.Attributes.Add("rel", "stylesheet");<br />
			htmlLink.Attributes.Add("type", "text/css");<br />
			htmlLink.Attributes.Add("media", "screen");<br />
			htmlLink.Href = strStyle;<br />
			htmlHead.Controls.Add(htmlLink);<br />
<br />
			strStyle = @"~/CSS/Print.css";<br />
			htmlLink = new HtmlLink();<br />
			htmlLink.Attributes.Add("rel", "stylesheet");<br />
			htmlLink.Attributes.Add("type", "text/css");<br />
			htmlLink.Attributes.Add("media", "print");<br />
			htmlLink.Href = strStyle;<br />
			htmlHead.Controls.Add(htmlLink);<br />
<br />
			// Add the shortcut icon.<br />
			htmlLink = new HtmlLink();<br />
			htmlLink.Attributes.Add("rel", "shortcut icon");<br />
			htmlLink.Attributes.Add("type", "image/x-icon");<br />
			htmlLink.Href = @"~/Images/favicon.ico";<br />
			htmlHead.Controls.Add(htmlLink);<br />
		}<br />


but put a condition on when you add whichever style sheet you need. In the example above I have one stylesheet for the screen and one for when I print the page that hides unwanted elements, but only if printed.

Hope that all makes sense.




QuestionOpen source and >net Pin
Mri1a9-Aug-07 21:23
Mri1a9-Aug-07 21:23 
AnswerRe: Open source and >net Pin
Vasudevan Deepak Kumar9-Aug-07 21:25
Vasudevan Deepak Kumar9-Aug-07 21:25 
AnswerRe: Open source and >net Pin
Michael Sync9-Aug-07 22:12
Michael Sync9-Aug-07 22:12 
AnswerRe: Open source and >net Pin
R. Giskard Reventlov10-Aug-07 2:32
R. Giskard Reventlov10-Aug-07 2:32 
AnswerRe: Open source and >net Pin
Malcolm Smart10-Aug-07 3:38
Malcolm Smart10-Aug-07 3:38 
GeneralRe: Open source and &gt;net Pin
Michael Sync10-Aug-07 6:03
Michael Sync10-Aug-07 6:03 
AnswerRe: Open source and >net Pin
.NET4Ever14-Aug-07 18:03
.NET4Ever14-Aug-07 18:03 
QuestionCan u plz give me a sample XSL code to collapse all the nodes in an XML document Pin
Rocky#9-Aug-07 21:18
Rocky#9-Aug-07 21:18 
AnswerRe: Can u plz give me a sample XSL code to collapse all the nodes in an XML document Pin
Michael Sync12-Aug-07 5:34
Michael Sync12-Aug-07 5:34 
GeneralRe: Can u plz give me a sample XSL code to collapse all the nodes in an XML document Pin
Rocky#12-Aug-07 18:56
Rocky#12-Aug-07 18:56 
GeneralRe: Can u plz give me a sample XSL code to collapse all the nodes in an XML document Pin
Michael Sync12-Aug-07 19:48
Michael Sync12-Aug-07 19:48 
GeneralRe: Can u plz give me a sample XSL code to collapse all the nodes in an XML document Pin
Rocky#12-Aug-07 20:02
Rocky#12-Aug-07 20:02 
QuestionWeb Service giving error .. The XML element 'EnableTheming' from namespace Pin
IamSarang9-Aug-07 20:37
IamSarang9-Aug-07 20:37 
AnswerRe: Web Service giving error .. The XML element 'EnableTheming' from namespace Pin
Michael Sync10-Aug-07 6:17
Michael Sync10-Aug-07 6:17 
QuestionMOSS 2007 Pin
Raheem MA9-Aug-07 20:15
Raheem MA9-Aug-07 20:15 
QuestionMicrosoft Forums Pin
Brendan Vogt9-Aug-07 18:22
Brendan Vogt9-Aug-07 18:22 
AnswerRe: Microsoft Forums Pin
Michael Sync9-Aug-07 19:53
Michael Sync9-Aug-07 19:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.