Style sheet question

Discussion in 'ASP .Net' started by Zach, May 24, 2012.

  1. Zach

    Zach Guest

    Could someone please tell me why the style sheet has no effect?


    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
    Inherits="_Default" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    <html xmlns="" >
    <head runat="server">
    <link href="Style.css" rel="stylesheet" type="text/css" />
    <body >
    <form id="form1" runat="server">
    <h1>This is a test page</h1>

    The style sheet (Style.css)

    Zach, May 24, 2012
    1. Advertisements

  2. Zach

    Arne Vajhøj Guest

    You code works fine here.

    Arne Vajhøj, May 31, 2012
    1. Advertisements

  3. Zach

    Zach Guest

    I couldn't find out what was going wrong in the actual code I was writing.
    Then I gave up using a separate style sheet and put the styles in
    and no probem, so I took the easy way out. The application has been
    uploaded and is running OK.

    Zach, Jun 1, 2012
  4. X-No-Archive: Yes

    Perhaps your stylesheet path was incorrect (subfolder?) or you were
    calling the index file from a subdirectory?
    You could try <link href="/Style.css" rel="stylesheet" type="text/
    css" />

    just a guess....

    Michael Lalonde - food catering
    Sudbury, Ontario
    Michael Lalonde, Jun 21, 2012
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.