如何使用css在顶部添加功能区?

如何使用css在顶部添加功能区?,css,position,ribbon,Css,Position,Ribbon,我拼命想在我的页面右上角添加这个png小功能区。一模一样, 我已经检查了他们的代码,但当我在我的代码中使用它时,它会变得一团糟。看一看: <style> html,body { background-color: #edecd8; margin:0; padding:0; height:100%; } #container {min-height:100%; position:relative;} #body { padd

我拼命想在我的页面右上角添加这个png小功能区。一模一样,

我已经检查了他们的代码,但当我在我的代码中使用它时,它会变得一团糟。看一看:

<style>

 html,body {
   background-color: #edecd8;

   margin:0;
   padding:0;
    height:100%;

 }

   #container {min-height:100%; position:relative;}



  #body {
    padding-bottom:20px;
  }


  a {text-decoration: none; color: black;}
  a:hover {color: #555555; border-bottom: 1px dotted black; }


#footer {
  position:absolute;
  bottom:0;
  width:100%;
  height:20px;/* Height of the footer */
  background: #edecd8;
  background-image:url(pattern.png);
  text-align:center;
  font-family: Century Gothic, sans-serif;
  font-size: 14px;
  font-variant: small-caps;
  }


.intro {
font-family: Century Gothic, sans-serif;
font-size: 15px;
font-variant: small-caps;
}

span.bottom {
    text-align: center;
    width:100%;
    position:absolute;
    bottom:0;   }

#mytable {
padding-top:30px;
}


</style>


</head>

<body>


 <div id="container">


 <div id="body">

<center>
<table div id="mytable" width="650" border="0" cellspacing="0" cellpadding="5" >
    <tbody>
    <tr>
      <td align="center" height="40"><img src="logo.jpg" alt="XXXX" width="100" height="30"></td>
    </tr>
    <tr>
      <td height="20" align="center" class="intro"> <a href="">online store</a> | <a href="">main website</a></td>
    </tr>
    <tr>
      <td height="352" align="center"><img src="ku.jpg" width="500" height="500"></td>
    </tr>
  </tbody>
  </table>
 </center>


  </div>



  <!-- Ola sto span class mporoun na xwresoun? -->
 <div id="footer"><span style class="bottom">  n@hotmail.com | the athens store | Mitropoleos 37 | t: 2xx00    </div>
 </div>


</body>

</html>

以下是功能区所需的全部代码:

HTML

<div id="new-themes">
    <a href="/design/themes/">Wordpress Themes</a>
</div>

确保将div正好放在我们体内。

您是否尝试添加位置:相对于容器div?但我的容器是相对的!你刚才复制粘贴了吗?我尝试了网站上的代码,但是上面的代码不起作用。你能在页面上显示你的代码吗?或者在或上制作一个样本-这将简化我们的任务以帮助您。你粘贴的HTML有点太少了,看不出你想要实现什么。看看……它在你的浏览器上工作吗?我认为这个问题有一个不必要的中心标签。
<div id="new-themes">
    <a href="/design/themes/">Wordpress Themes</a>
</div>
#new-themes {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1000;
}

#new-themes a {
  background: url("/deck/wp-content/themes/tbd/images/ribbon-themes-red.png") no-repeat;
  display: block;
  height: 140px;
  width: 140px;
  text-indent: -9000px;
}