#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    Europa
    Posts
    21
    Rep Power
    0

    CSS Link Background


    To start with, here's a block of code:

    my style.css

    Code:
    .main { 
    	font-family: Verdana, Arial, Helvetica, sans-serif;
     	font-size: 11pt;
     	color: #FFFFFF;
     	background-color: #666666;
     	text-align: center;
     	vertical-align: top;
     	border: #000000; } 
    
    a.main:link  {
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-size: 12px;
      font-weight: bold;
      color: #FFFFFF;
      text-decoration: none;
      background-color: #666666; }
    
    a.main:visited { 
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-size: 12px;
      font-weight: normal;
      color: #FFFFFF;
      text-decoration: none;
      background-color: #666666; } 
    
    a.main:hover {
      font-family: Arial, Helvetica, sans-serif;
      font-size: 12px;
      font-weight: bold;
      color: #FF8A00;
      text-decoration: underline overline line-through;
     background-color: #666666;} 
    
    a.main:active {  
      font-family: Arial, Helvetica, sans-serif;
      font-size: 12px;
      font-weight: bold;
      color: #FF6F00;
      text-decoration: blink;
      background-color: #666666; }
    my html-file's thingies:

    Code:
     <div id="Main" style="position:absolute; width:50%; z-index:5; left: 25%; top:
     25%; background-color: #333333;
     layer-background-color: #333333;
     border: 3px none #000000;" class="main">
    And the problem:
    With Windows XP /w IE and Linux /w Opera I get the same stupid looking detail - the backgrounds of the links are different from the div's background. So that the dark grey part is broken by the links and their light grey boxes. Looks horrific..

    By the way, is there a good place for language references for CSS, PHP and HTML in the internet (URL)?
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Apr 2003
    Location
    Italy, EU
    Posts
    517
    Rep Power
    12
    You've defined your anchor tags as background-color: #666666 and set the DIV's background-color to #333333... so they ARE different!!
    Set your anchors' background-color to #666666

    Take a look at the follwing sites:
    CSS level 2
    PHP
    HTML

    Hope this helps!
    Cheers, Dave

IMN logo majestic logo threadwatch logo seochat tools logo