C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

how to apply stylesheet to web form?


Posted Date: 29 Nov 2008      Posted By: Red Swan      Member Level: Gold     Points: 1   Responses: 5



hi , this is new for me, please guide how we can apply the existing stylesheet to our web forms? plz it is urgent ....




Responses

Author: Arun Jacob    29 Nov 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 6

You have to create an App_Themes folder for applying themes and skin.

Create cascading style sheets & skin inside App_Themes folder.

like


body
{
background-color: #C0C0C0;
font-family: Verdana;
font-size: medium;
font-weight: normal;
font-style: normal;
font-variant: normal;
color: #000000;
}



so it will automatically applied to body.

otherwise create like this


.Class
{
background-color: #C0C0C0;
font-family: Verdana;
font-size: medium;
font-weight: normal;
font-style: normal;
font-variant: normal;
color: #000000;
}


In this case you have to set explicitly the CSSClass for control to which you want to apply the style.

:-)

Arun Jacob
http://codepronet.blogspot.com/



Author: Red Swan    29 Nov 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 3

no, i have the css file , but i also have the master- content pages, like one is imaster page & others are contents. so how to ally this .css file to master as well as content page ?


Author: rohitash yadav    29 Nov 2008Member Level: BronzeRating: 2 out of 52 out of 5     Points: 2

hi i think u need this

<head>

<link href="style_sheet name.css" rel="stylesheet" type="text/css" />

</head>



Author: Varun Bansal    29 Nov 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 6

add your style sheet file in our web application using add exiting item.
then write below statement

<link href="style.css" rel="stylesheet" type="text/css" />

in head section in the html page for link css file to web page.

after then you can apply css on any control in our web form like that..

suppose that a class write with the name of .text1 in your css file ..
.text1
{
text-transform:uppercase;
font-size:10pt;
FONT-FAMILY: verdana,tahoma,geneva,arial,helvetica,sans-serif;
}

and you want to apply this clas on textbox then set the CssClass property by .text and run your application.
the property of .text1 class of css file will be apply on textbox..

regards
varun bansal

Regards
Varun bansal
Do ot forget to Rate the post.....
Click here for visiting in my blogs



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Add Item Template in GridView----- URGENT
Previous : I can not understand below item template in data grid.Can i use it in grid view?
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use