Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Background colour issues

  • 11-07-2010 03:02PM
    #1
    Registered Users, Registered Users 2 Posts: 922 ✭✭✭


    Right, this is driving me nuts, it is a basic problem, but I appear to be unable to see the problem!

    Basically, when I use a .css file to set the background colour of a webpage it doesn't work. When I add the the style in the header using the <style> it works just fine. At first I thought it might be one of the other elements affecting it but even when I remove all the other styles the problem still remains.

    style.css
    #body
    {
    background-color:#0000FF;
    }
    

    test.html
    <html>
    <head>
    <link rel="stylesheet" href="style.css" type="text/css"/>
    </head>
    
    <body>
    
    <p>This is some text</p>
    
    </body>
    </html>
    

    I'm sure the problem is clear to someone, but alas, I can't see the wood for the trees...


Comments

Advertisement
Advertisement