473,387 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

CSS and Masterpages

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>

Aug 7 '06 #1
1 1249
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
Aug 7 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Roger Walter | last post by:
When using the MasterPages form Templating from ASP.NET web Controls, and also using another templating process that uses User Controls, I get a border around the entire page when it is rendered...
1
by: nLella | last post by:
I am trying to build a new web application and trying to implement either templates or master pages in it. I tried to read several articles but could not actually deside on weather to go with the...
2
by: clintonG | last post by:
Does anybody know how to use a control such as the DropDownList to change Themes when using MasterPages? I'm also asking in the forum. <%= Clinton Gallagher METROmilwaukee (sm) "A Regional...
6
by: Kenneth Keeley | last post by:
Hi, I have a Masterpage that controls the basic layout of the pages displayed on a web site. The masterpage also uses some variables. I would like to be able to access some of these variables from...
4
by: Jeff Lynch | last post by:
I need to call a class on every web page in a site. In ASP.NET 1.1 I would call this class before the Page_Load event in each web page's code-behind file since it needs to run before the web page...
3
by: Lars W. Andersen | last post by:
Hi, I am looking for a good - easy to comprehend little CMS application for my "beginners" asp.net 2.0 site. It must be able to use Access as the database (only a couple of people will be...
2
by: iturner100 | last post by:
Hi, I've been struggling with this one for a couple of hours without much joy. Basically, I've got a set of nested masterpages (3 as it happens). I'm dynamically generating a new page in code...
5
by: Nick Wouters | last post by:
Dear All In Classic ASP I used CSS for ALL layout. Now in ASP.NET version 2 I am testing out Masterpages as they come in very handy. It seems like it is replacing CSS for layout but what is...
6
by: =?Utf-8?B?U3RlcGhlbiBIYXRmaWVsZA==?= | last post by:
I have two masterpages in a web application. One is used for the login and logout pages. The other is used for all other pages in the application. The difference between the two masterpages is...
8
by: Mort Strom | last post by:
Right now the header of my master page contains all of the CSS styles for all of the pages that might be loaded in my ContentPlaceHolder. The problem is that my <styletag is getting too large to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.