SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member Aina's Avatar
    Join Date
    Aug 2010
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy CSS with Masterpages

    I am trying to use my CSS file with master page but its not working. I have my css file in Theme folder.

    <%@ Master Language="VB"%>
    <%@ Register Src="~/menuWinXPThemes.ascx" TagName="menuWinXPThemes" TagPrefix="uc2" %>
    <%@ Register Src="~/menuMSNThemes.ascx" TagName="menuMSNThemes" TagPrefix="uc1" %>


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    <script runat="server">
    Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

    'Me.WebPartManager1.DisplayMode = WebPartManager.BrowseDisplayMode
    Dim link As New HtmlLink
    link.Href = "C:\Users\c-bkatoch\Documents\Visual Studio 2008\Projects\LocalShareReports\LocalShareReports\App_Themes\MySite\MySite.css"
    link.Attributes.Add(HtmlTextWriterAttribute.Rel.ToString(), "stylesheet")
    Page.Header.Controls.Add(link)
    End Sub

    </script>

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title></title>

    <style type="text/css" id="print" media="print">
    #leftSide, #footerSide {
    display:none;
    }
    </style>
    </head>
    <body>
    <form id="form1" runat="server">

    <table width="100%" cellspacing="0" cellpadding="0" border="0" class="table.header">
    <tr>
    <td class="td.logo">
    <asp:Image ID="Image1" runat="server" skinid="logo"/></td>
    <td class="title">
    my site
    </td>
    </tr>
    </table>
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
    <td colspan="1" class="td.headerbar">
    &nbsp;&nbsp;
    </td>
    <td colspan="2" class="td.headerbar">
    <asp:SiteMapPath ID="SiteMapPath1" runat="server" SkinID="SiteMap" />&nbsp;&nbsp;
    </td>
    </tr>
    </table>




    </form>
    </body>
    </html>

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,623
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    IF the CSS File is in the theme folder, it will get pulled in if you use that theme.

    Hardcoding the URL to your local disk won't work in production.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •