eramgarden Posted April 10, 2004 Posted April 10, 2004 This is my first attempt at CSS.. 1. I have an "ascx" file. Added this line to it: <%@ Control Language="vb" AutoEventWireup="false" Codebehind="SideMenu.ascx.vb" Inherits="ASPApp.SideMenu" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %> [b]<LINK href="Styles.css" type="text/css" rel="stylesheet">[/b] 2. Added a button with this line: <TR bgColor="lightslategray"> <TD align="middle" colSpan="1" height="50" rowSpan="1"><asp:button id="btnHome" runat="server" Text="Home" Font-Bold="True" [b]CssClass="ButtonStyle" [/b]></asp:button></TD> </TR> 3. Added a CSS Class: .ButtonStyle { height : 50px; width : 150px; } But the Height and Width arent being read from the CSS file. In my .Net book, it has to put the "link" in between <HEAD>...but i do NOT have a <HEAD> tag in ascx file.. What am I missing?? Quote
bungpeng Posted April 10, 2004 Posted April 10, 2004 You use external CSS file in user control? Please do remember user control not independ, so it's URL is follow the webform you tie to. In your case, I suspect your webform and user control not located in same directory, so the system can't found the actual CSS file. Hope you understand what I talking about... :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.