Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Mar 2009
    Posts
    97
    Thanks
    10
    Thanked 0 Times in 0 Posts

    why isnt my CSS working?

    Hi guys.

    Ive included my css into my php file and still doesnt work :S NOTHING at all works, even if i change the family-font it wont change.

    Heres my code

    usercp.php file

    Code:
    <html>
        <head>
            <title> User Control Panel </title>
            <link rel="stylesheet" type="text/css" href="/includes/style.css" />
        </head>
        <body>
            <div id="wrapper">
                <div id="header" align="top">
                    header
                </div>
    
                <div id="content" class="content" align="center">
                        CONTENT
                </div>
    
                <div id="sidebar" align="right">
                    sidebar
                </div>
            </div>
        </body>
    </html>

    style.css

    Code:
    #content {
        border: 1px solid black;
        margin: 10px;
        font-family: Arial,Helvetica,sans-serif;
        font-weight: lighter;
        font-variant: small-caps;
    }
    
    .content {
        border: 1px solid black;
        margin: 10px;
        font-family: Arial,Helvetica,sans-serif;
        font-weight: lighter;
        font-variant: small-caps;
    }
    
    #header {
        border: 1px solid black;
        margin-top: 10px;
    
    }

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,678
    Thanks
    6
    Thanked 1,009 Times in 982 Posts
    Where is the stylesheet located on the server? Currently it’s looking for it in the “includes” directory which is supposed to be directly in the root of your server.

  • #3
    New Coder
    Join Date
    Mar 2009
    Posts
    97
    Thanks
    10
    Thanked 0 Times in 0 Posts
    Yeh, the usercp.php is located in c:\wamp\www\blogit
    and style.css is located in C:\wamp\www\blogit\includes

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,678
    Thanks
    6
    Thanked 1,009 Times in 982 Posts
    Then I suppose the path must read:
    Code:
    <link rel="stylesheet" type="text/css" href="/blogit/includes/style.css" />
    Or you use a relative path, i. e. without the slash at the beginning:
    Code:
    <link rel="stylesheet" type="text/css" href="includes/style.css" />


  •  

    Posting Permissions

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