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?

    Zach.

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
    Inherits="_Default" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title>Test</title>
    <link href="Style.css" rel="stylesheet" type="text/css" />
    </head>
    <body >
    <form id="form1" runat="server">
    <div>
    <h1>This is a test page</h1>
    </div>
    </form>
    </body>
    </html>

    <!---
    The style sheet (Style.css)

    body
    {
    background-color:Yellow;
    }
    --->
     
    Zach, May 24, 2012
    #1
    1. Advertising

  2. Zach

    Arne Vajhøj Guest

    On 5/24/2012 8:48 AM, Zach wrote:
    > Could someone please tell me why the style sheet has no effect?


    You code works fine here.

    Arne
     
    Arne Vajhøj, May 31, 2012
    #2
    1. Advertising

  3. Zach

    Zach Guest

    "Arne Vajhøj" <> wrote in message
    news:4fc6c876$0$284$...
    > On 5/24/2012 8:48 AM, Zach wrote:
    >> Could someone please tell me why the style sheet has no effect?

    >
    > You code works fine here.
    >
    > Arne
    >


    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
    <style>...</style>
    and no probem, so I took the easy way out. The application has been
    uploaded and is running OK.

    Thanks,
    Zach,
     
    Zach, Jun 1, 2012
    #3
  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 - Jumlers.com food catering
    Sudbury, Ontario
     
    Michael Lalonde, Jun 21, 2012
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roy
    Replies:
    1
    Views:
    1,686
    Eliyahu Goldin
    Aug 2, 2005
  2. Arondelle

    A Style Sheet Question

    Arondelle, Jul 3, 2004, in forum: HTML
    Replies:
    9
    Views:
    598
    Arondelle
    Jul 3, 2004
  3. Kevin
    Replies:
    0
    Views:
    522
    Kevin
    Jul 31, 2003
  4. bjam
    Replies:
    3
    Views:
    464
  5. Replies:
    0
    Views:
    567
Loading...

Share This Page