Results 1 to 5 of 5

Thread: Started Coding Yesterday...Html file won't load menu.css

  1. #1
    Join Date
    Apr 2008
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Started Coding Yesterday...Html file won't load menu.css

    Hey so I have a menu_bar.html file that is loaded in the left frame of my frames.html file. In the menu_bar.html file i have the appropriate <link rel=...etc> line in my <head> section. I am using a file from this site, the Glossy Vertical Menu. I copied, pasted, and saved the exact text from http://www.dynamicdrive.com/style/cs...vertical-menu/ in text editor as "menu.css"

    What is wrong with my code below for the menu_bar.html?

    <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <html>

    <head>
    <meta name="Author" content="Travis">
    <title>Menu</title>
    <link href="menu.css" rel="stylesheet" type="text/css" />
    </head>

    <ul class="glossymenu">
    <li><a href="Coaches.html"> Our Coaches</a></li>
    <li>**Under Construction!</li>
    <li>Videos</li>
    <li>Upcoming Events</li>
    </ul>

    </html>

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    I can't be sure, but I suspect that you probably have the <style></style> tags in the .css file. Remove those, and all should work.

    As a side note, don't get in the habit of using frames. Since you just started and are learning -- learn the right way!

    Here are some frame-like layouts that can be achieved with CSS; therefore, you'll have valid HTML code.

  3. #3
    Join Date
    Apr 2008
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default No luck

    I tried removing the frame and just inserting the menu. Still no luck.

    The code I have is the same as that for the Glossy Vertical Menu's .css, but I deleted the first </style...> line and the </style> at the end, as you suggested. No improvement. The site is:

    http://www.racquetball.imsports.duke.edu/

    if you want to see what it spits out.

  4. #4
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    In your css, change these lines:

    Code:
    /*Credits: Dynamic Drive CSS Library */
    /*URL: http://www.dynamicdrive.com/style/ */
    
    .glossymenu{
    list-style-type: none;
    margin: 5px 0;
    padding: 0;
    width: 170px;
    border: 1px solid #9A9A9A;
    border-bottom-width: 0;
    }
    
    .glossymenu li a{
    background: white url(media/glossyback.gif) repeat-x bottom left;
    font: bold 13px "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, sans-serif;
    color: white;
    display: block;
    width: auto;
    padding: 3px 0;
    padding-left: 10px;
    text-decoration: none;
    
    }
    
    
    * html .glossymenu li a{ /*IE only. Actual menu width minus left padding of A element (10px) */
    width: 160px;
    }
    
    .glossymenu li a:visited, .glossymenu li a:active{
    color: white;
    }
    
    .glossymenu li a:hover{
    background-image: url(media/glossyback2.gif);
    }
    with this:

    Code:
    /*Credits: Dynamic Drive CSS Library */
    /*URL: http://www.dynamicdrive.com/style/ */
    
    .glossymenu{
    list-style-type: none;
    margin: 5px 0;
    padding: 0;
    width: 170px;
    border: 1px solid #9A9A9A;
    border-bottom-width: 0;
    }
    
    .glossymenu li a{
    background: white url('/glossyback.gif') repeat-x bottom left;
    font: bold 13px "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, sans-serif;
    color: white;
    display: block;
    width: auto;
    padding: 3px 0;
    padding-left: 10px;
    text-decoration: none;
    
    }
    
    
    * html .glossymenu li a{ /*IE only. Actual menu width minus left padding of A element (10px) */
    width: 160px;
    }
    
    .glossymenu li a:visited, .glossymenu li a:active{
    color: white;
    }
    
    .glossymenu li a:hover{
    background-image: url('/glossyback2.gif');
    }
    That's the only thing I could see that is wrong.
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  5. The Following User Says Thank You to thetestingsite For This Useful Post:

    travis07 (04-06-2008)

  6. #5
    Join Date
    Apr 2008
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    OH thanks!

    That was almost the right fix. I wasn't paying attention to the file path...they're in the same folder on my server, so I just had to get rid of everything before the filename.

    Thanks again

Bookmarks

Posting Permissions

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