Switch to full style
HTML code examples
Post a reply

setting div background position

Sun Dec 04, 2011 12:18 am

Anchor div background position.
Code:
<html>
<
head>
<
title>Anchor background-position</title>
<
style rel="stylesheet" type="text/css">
#header {
  width: 800px;
  height: 300px;
  background-position: top right;
  background-image: url(site_logo.gif);
}

#sectionPart {
  float: left;
  margin: 50px 0 0 30px;
}

#sectionPart li {
  display: inline;
  line-height: 40px;
}

#sectionPart li a {
  background-color: green;
  background-position: top right;
  background-repeat: no-repeat;
  height: 40px;
  display: block;
  float: left;
  font-size: 13px;
  color: white;

}

</
style>
</
head>
<
body>
  <div id="header">
    <ul id="sectionPart" >
      <li><a href="#" >Fixed list element example!...</a></li>
       <li><a href="#" >Fixed list element example!...</a></li>
        <li><a href="#" >Fixed list element example!...</a></li>
    </ul>
    </div>

</
body>

</
html>
 




Post a reply
  Related Posts  to : setting div background position
 X and Y background position     -  
 Set position of background image in pixels     -  
 right bottom background image position     -  
 Change background position when mouse over     -  
 Setting a Cookie Value in php     -  
 Setting maximum height of paragraph -P tag     -  
 (3.0.4) Skymiles Setting Fixed WIDTH     -  
 Dynamically Setting and Accessing Variables     -  
 Toggle the Multi Monitor Setting in Windows XP     -  
 Mouse position in C++     -  

Topic Tags

CSS Background, HTML Div