1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

what am I doing wrong - style sheet won't work

Discussion in 'CSS' started by Lpspider, Aug 19, 2005.

  1. #1
    Okay, I'm having problems. I linked to an external style sheet, but I can't seem to get the style sheet to effect part of my page. It only effects the (below) .leftnavlink file, how I want it. But it leaves the .rightnavlink file how it appears on the page. I want to possition it more to the right and get the a hover to work, but it won't. :(

    My external CSS file-

    .leftnavlink ul
    {
    float:left;
    width:100%;
    padding:0;
    margin:0;
    list-style-type:none;
    }
    .leftnavlink a
    {
    float:left;
    width:9em;
    text-decoration:none;
    color:00688B;
    background-color:none
    padding:none;
    face:arial;
    }
    .leftnavlink a:hover {background-color:#8DB6CD}
    li {display:inline}
    
    
    
    
    
    
    
    .rightnavlink ul
    {
    float:left;
    width:100%;
    padding:0;
    margin:0;
    list-style-type:none;
    }
    .rightnavlink a
    {
    float:left;
    width:9em;
    text-decoration:none;
    color:00688B;
    background-color:none
    padding:none;
    face:arial;
    }
    
    .rightnavlink a:link 
    {
    color : #ff8c00;
    }
    .rightnavlink a:visited 
    { 
    text-decoration: none; color:#00688B
    }
    
    .rightnavlink a:hover {color:#ff8c00}
    li {display:inline}
    
    .rightnavlink
    {
    position: absolute;
    top: 180px;
    left: 600px
    }
    
    
    
    
    
    Code (markup):
    Link in the head of the page-

    <link href="style.css" rel="stylesheet" type="text/css">
    
    Code (markup):
    Thanks for any and all help!
     
    Lpspider, Aug 19, 2005 IP
  2. Dji-man

    Dji-man Peon

    Messages:
    185
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can you post the url to the site? What exactly doesn't work in rightnavlink?

    Make sure you end all your css elements by ; , most of your rightnavlink elements don't have it.

    BTW, using a different color for .rightnavlink a:link and .rightnavlink a won't do much and "face" is not a css element. It should be font: arial or font-family: arial.

    Good luck.
     
    Dji-man, Aug 19, 2005 IP
  3. Lpspider

    Lpspider Well-Known Member

    Messages:
    2,216
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    160
    #3
    here

    The actual coding on the page is linked to another page with a php include, (leftmenu.php and rightmenu3.php)

    I added the semicolin, no affect.

    I messed around with it, it works when I have the style sheet as an internal style sheet or on the actual page (rightmenu3.php). But I want it to work on an external style sheet, and it won't.

    Thanks for any help.
     
    Lpspider, Aug 19, 2005 IP
  4. Dji-man

    Dji-man Peon

    Messages:
    185
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    for some reason, your links in rightnavlink get their style from .leftnavlink a.

    An easy way out of this mess would be to add class="" to your links instead of combining everything in the same class. Although there is surely a way to have it to work, especially since it works if the styles are in the page. Since, I can't see how you call up your includes files, and in which order, it's difficult for me to tell if that could be an issue.

    Something that can screw everything up real good is your "creative" use of html in div rightnavlink.
    <width="88" height="31" border="0">
    Code (markup):
    does not exist in html

    same with
    <border="0">
    Code (markup):
    You should also move all your <font> and <center> tags to the css.

    Also make sure you close all your tags, even those that are optional eg. <p></p>

    good luck
     
    Dji-man, Aug 19, 2005 IP
    Lpspider likes this.
  5. Lpspider

    Lpspider Well-Known Member

    Messages:
    2,216
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    160
    #5
    Alright thanks. For some reason I just can't get more than one class to work from an external style sheet.

    I'm working on simply pasting the style for each menu in the php include. seems to be working.

    Thanks for the assistance.
     
    Lpspider, Aug 19, 2005 IP