Results 1 to 2 of 2

Thread: Problem with opacity

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

    Default Problem with opacity

    Hi,

    I have just started experimenting with opacity in css.

    Here is the address of the website in question:
    http://djbenj.co.uk/78/

    The problem is with the navigation part. I have set the background of it to be slightly transparent. However the text part needs to be completely opaque.

    Can anyone help me at all?

    Here is the CSS and HTML:

    HTML Code:
    	<div id="main_img">
    		<ul id="main_img_nav">
    
    			<li><a href="#">home</a></li>
    			<li><a href="#">about</a></li>
    			<li><a href="#">services</a></li>
    			<li><a href="#">contact</a></li>
    		</ul>
    	</div>
    Code:
    #main_img { 
    		background: url(images/main_img.jpg);
    		height: 238px; 
    } 
    		
    #main_img_nav { 
    		margin: 0; 
    		padding: 0; 		
    		list-style: none;
    		display: block; 
    		height: 52px; 
    		width: 753px; 
    		background: #5c5c5c;
    		opacity: 0.4;
    		filter:alpha(opacity=40); 
    } 
    #main_img_nav  li {
    		display: inline; 
    } 
    #main_img_nav a {
    		display: block; 
    		height: 36px;
    		padding-top: 16px;  
    		width: 120px;
    		text-decoration: none; 
    		color: #fff;
    		float: left;
    		text-align: center;
    		font-family: Arial, Helvetica, sans-serif; 
    		font-size: 15px;
    		letter-spacing: 1px;
    		font-weight: bold;
    }

  2. #2
    Join Date
    May 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have found a solution:
    http://developer.mozilla.org/en/docs...and_Background

    If anyone has any further comments though please feel free to say them.

    Cheers,

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
  •