Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > CSS and Masterpages

Reply
Thread Tools

CSS and Masterpages

 
 
farseer
Guest
Posts: n/a
 
      08-07-2006
Hello,
i have the following stylesheet named Master.css with content as
follows:

body
{
font-family: Tahoma,sans-serif;
font-size: 150%;
background-color:Yellow;

}

When i include this in my master page as such:

<head runat="server">
<link rel="StyleSheet" href="Master.css" type="text/css">
</head>

I do not see the styles being effected on my master page. However, if
i were to directly specify the styling in the master page it self using
the html below, it does. Why does one work and not the other.

<STYLE TYPE="text/css" MEDIA=screen>
body
{
font-family: Tahoma,sans-serif;
font-size: 150%;
background-color:Red;

}
</STYLE>

 
Reply With Quote
 
 
 
 
Erik Funkenbusch
Guest
Posts: n/a
 
      08-07-2006
On 6 Aug 2006 17:15:22 -0700, farseer wrote:

> When i include this in my master page as such:
>
> <head runat="server">
> <link rel="StyleSheet" href="Master.css" type="text/css">
> </head>
>
> I do not see the styles being effected on my master page. However, if
> i were to directly specify the styling in the master page it self using
> the html below, it does. Why does one work and not the other.


The css has to be accessible relative to the content page, not the master
page. That means that if your master page is at /master/master.master and
your css is at /master/master.css and your content page is at
/default.aspx, then your link href has to point to /master/master.css
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
masterpages with masterpages JohnE ASP .Net 1 12-08-2009 12:11 AM
MasterPages and applying CSS to content pages Mort Strom ASP .Net 8 03-02-2008 04:22 AM
CSS in MasterPages Rbrt ASP .Net 15 12-05-2007 05:03 PM
Masterpages css problems =?Utf-8?B?TWFya0F1cml0?= ASP .Net 1 10-26-2006 10:22 PM
masterpages vs. CSS or Masterpages with CSS??? help me out please! Nick Wouters ASP .Net 5 05-08-2006 10:19 AM



Advertisments