...

View Full Version : Menu over background image



tqmd1
10-26-2011, 05:50 AM
Dear Experts

I have following codes



<html>
<title>Asia Ghee Mills</title>

<style type="text/css">

#menu {float: left;
width:15%;height:400px;
background-color:pink;
padding:5px 5px 5px 5px;
font-size:15pt;color:green;font-family:arial;
margin-top:10px;margin-left:0px;
line-height:28px}


#menu img {width:100%;height:200px;}


a:link {color: blue; text-decoration: none;text-decoration:underline; }
a:visited {color: red; text-decoration: none; }
a:hover {color:blue; background:url("skyblue.bmp");text-decoration:underline;font-weight:bold}

</style>


<DIV id="menu"><img src="images4.jpg" alt=" ">
<A HREF="http://wwww.a.com">Home</a><br>
<A HREF="http://wwww.a.com">Products</a><br>
<A HREF="http://wwww.a.com">Health Tips</a><br>
<A HREF="http://wwww.a.com">Others</a><br>
<A HREF="http://wwww.a.com">Contact Us</a>
</DIV>
</body>
</html>




Proplem is shown in attached image

Excavator
10-26-2011, 08:40 AM
Hello tqmd1,
To make an image a background of an element you should apply it from the CSS.
Try this for styling your #menu instead:
#menu {
width: 15%;
float: left;
background: #fcf url(images4.jpg);
padding: 5px;
color: #0f0;
font: 15pt/28px arial;
margin: 10px 0px 0px;
}

See CSS background properties here (http://www.w3schools.com/css/css_background.asp).

tqmd1
10-26-2011, 11:15 AM
Sir, I did not use background-imag in css becuase my IE6 does not support image stretch.

I used your codes also but problem is still exists.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum