www.webdeveloper.com
Results 1 to 3 of 3

Thread: Part of My CSS Stopped Working When Put in External Stylesheet

  1. #1
    Join Date
    Jun 2006
    Location
    Under your bed
    Posts
    357

    Part of My CSS Stopped Working When Put in External Stylesheet

    I'm linking to my stylesheet in the head of my page like this:
    <link rel="stylesheet" type="text/css" href="/css/main.css" media="screen">
    Every part with a # in front of it seems to be working, but the ".rounded" and "body, html, td" part seem not to be. Ever since I moved this stylesheet out of the page and put it in its own file, the background and text have been unstyled. The rounded corners on the elements belonging to the class "rounded" are gone too.

    <style type='text/css'>
    body, html, td
    {
    margin:0;
    padding:0;
    color:#000;
    background:#a7a09a;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size: 10pt;
    }
    #wrapper
    {
    width:950px;
    margin-top: 5px;
    margin-bottom: auto;
    margin-right: auto;
    margin-left: auto;
    background:#432b13;
    text-align: center;
    border: 4px solid #432b13;
    border-radius: 8px;
    }
    #header
    {
    padding: 0px;
    margin-top: 0px;
    text-align: center;
    width: 100&#37;;
    border-radius: 8px;background-color: #432b13;
    overflow: hidden;
    }
    #links
    {
    background-color: #dacea4;
    border-top: 3px solid #432b13;
    border-bottom: 6px solid #432b13;
    text-align: center;
    font-size: 16pt;
    color: #0076a3;
    font-weight: bold;
    padding: 0px;
    height: 40px;
    vertical-align:middle;
    border-radius: 8px;
    }
    #sidebar
    {
    text-align: left;
    }
    #pagetitle
    {
    color: #432b13;
    font-size: 16pt;
    font-weight: bold;
    margin: 8px;
    }
    #content
    {
    width: 100%;;
    border-radius: 8px;
    }
    #footer
    {
    background-color: #432b13;
    clear: both;
    }
    #bottomstuff
    {
    margin-top: 5px;
    text-align: center;
    }
    .rounded
    {
    border-radius: 6px;
    }
    A:link
    {
    text-decoration: none;
    color: #00648a;
    }
    A:visited
    {
    text-decoration: none;
    color: #00648a;
    }
    A:hover
    {
    text-decoration: underline;
    color: #00648a;
    }
    </style>
    The better I get at programming, the more I appreciate arrays. Handy dandy things they are.

  2. #2
    Join Date
    Aug 2006
    Posts
    1,909
    If that is your external stylesheet, you need to remove the first and last lines from it, those are html.

    Other than that, I can't think of anything specific related to the tags you mention. If removing those lines doesn't help, you might post a link to the page.

    Dave

  3. #3
    Join Date
    Jun 2006
    Location
    Under your bed
    Posts
    357
    That fixed it, yay
    The better I get at programming, the more I appreciate arrays. Handy dandy things they are.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles