css绝对定位

页面Html

 

  1. <div class="contentArea">  
  2.         <div id="navmenu"></div>          
  3.         <div id="linkad"></div>  
  4. </div>  

相关CSS定义

 

  1. .contentArea {  
  2.         position:relative;         /*声明一个固定的位,必须*/  
  3.         width:910px;   
  4.         overflow:hidden;  
  5. }  
  6. #linkad {   
  7.         position:absolute;         /* 绝对定位 */  
  8.         z-index:9999;  
  9.         top:31px;  
  10.         left:0;  
  11.         width:908px;   
  12.         height:20px;  
  13.         background:#ECE9E1;  
  14. }  

 

posted @ 2012-07-13 17:18  leejersey  阅读(311)  评论(0编辑  收藏  举报