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 »

Css files


Posted Date: 10 Oct 2008      Posted By: Kshitij Bhargava      Member Level: Gold     Points: 1   Responses: 6



why my css files not showing effect on page can tell me the reasons why

even i have added the reference of the css files ??


thks





Responses

Author: Miss Meetu Choudhary    10 Oct 2008Member Level: DiamondRating: 2 out of 52 out of 5     Points: 4

Please Place the code of you aspx or html file here in which your CSS code is not working so that we may have a deep idea of the problem if you have added reference properly and called the class then it should work

--
thanks and regards
Meetu Choudhary

Thanks and Regards
Miss Meetu Choudhary (Site Coordinator)
Go Green Save Green
My Profile on Google



Author: Mari raj k    10 Oct 2008Member Level: SilverRating: 2 out of 52 out of 5     Points: 3

Two easy options:

1. Set css path as relative to root [ like "/css/style.css"]

2. Enable themes, create a theme in app_themes. Put the css there...it's guaranteed to load for all pages.



Author: Sidewinder2    10 Oct 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 5

eventhough you had specified the path of the style sheet you have to use the cssclasses you had defined in that style sheet in your mark up

eg

in your style sheet

label
{
width :150px;
text-align:left ;
vertical-align :top ;
font-family:Verdana;

}

in your mark up :

<asp:Label ID="lblSessionstarted" runat="server" CssClass="lable" Text="Session Started"></asp:Label>

then only your styles will be applied to your controls.


cheers!,
Myself



Author: Abhi    10 Oct 2008Member Level: DiamondRating: 2 out of 52 out of 5     Points: 5

you must have done some mistakes.


<link rel="Stylesheet" type="text/css" href="../../../styles/Controls.css" />

Controls.css

.classButton
{
color:#153F67;
background: #FFFFFF url(../images/img1.jpg) repeat-x;
color: #153F67;
font:bold 11px verdana;
border:1px solid #739FC9;
height:24px;
padding:1px;
}

in .aspx page

<input type="button" id="btnReview" runat="server" value="Review " class="classButton" />

Thanks and Regards,
Abhay



Author: sowmya    10 Oct 2008Member Level: BronzeRating: 2 out of 52 out of 5     Points: 3

Drag and drop that css folder under u r head part


<head runat="server">
<title>RESUME</title>
<link href="Javascr/aw.css" rel="stylesheet" type="text/css" />
</head>

Happy coding


Sowmya



Author: Manindra Upadhyay    10 Oct 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 1

set currect CSS file path

<link rel="Stylesheet" type="text/css" href="styles/style1.css" />



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 : img src as .aspx page
Previous : Ajax timer Control
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use