Re: CSS linked in aspx not working

Discussion in 'ASP .Net' started by Cy Huckaba, Jun 25, 2003.

  1. Cy Huckaba

    Cy Huckaba Guest

    My experience with css has led me to always use an actual path when linking to
    stylesheets. It's easiest and you can add that same tag to any page at any level
    in your site if you give it a reative path to the root.

    use "/Styles.css" if you are in the root directory of the web.

    Try this for the same directory "./Styles.css"

    Also, when working with css across browsers, make sure you are case-sensitive,
    netscape won't usually match unless it's exact.

    Cy Huckaba


    "Andy Nagai" <> wrote in message
    news:ZKQJa.10010$...
    > Hi
    >
    > I have a basic css class:
    >
    > .TextBoxStyle
    > {
    > border-right: blue double;
    > border-top: blue double;
    > font-size: medium;
    > border-left: blue double;
    > color: white;
    > border-bottom: blue double;
    > background-color: #6699cc;
    > }
    >
    > in a .css file in the root web folder. same folder as aspx file. I reference
    > the css file like this in the aspx file in the head:
    >
    > <LINK href="Style.css" type="text/css" rel="stylesheet">
    >
    > Now the textbox just displays normal when i run the page. none of the style
    > is applied. When i insert the css class directly in the aspx file, it
    > displays like it supposed to. But when i link to the css file, nothing
    > happens. For some reason linking to the css file doesnt work. Anyone
    > encounter this?
    >
    >
    >
    >
    Cy Huckaba, Jun 25, 2003
    #1
    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. Chris Ritchey
    Replies:
    7
    Views:
    458
    emerth
    Jul 10, 2003
  2. Chris Ritchey

    Generating a char* from a linked list of linked lists

    Chris Ritchey, Jul 9, 2003, in forum: C Programming
    Replies:
    7
    Views:
    447
    emerth
    Jul 10, 2003
  3. Josue Maldonado

    css not working in .aspx page

    Josue Maldonado, Aug 9, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    2,322
    Josue Maldonado
    Aug 10, 2006
  4. fool
    Replies:
    14
    Views:
    483
    Barry Schwarz
    Jul 3, 2006
  5. joshd
    Replies:
    12
    Views:
    649
    John Carson
    Oct 2, 2006
Loading...

Share This Page