【问题标题】:Image behind image/sidebar图片/侧边栏后面的图片
【发布时间】:2013-05-27 00:20:34
【问题描述】:

我最近做了一个导航栏,但是我想把侧边栏上的部分放在侧边栏标题/图片后面

网站是:http://testcheww.blogspot.com

i.imgur.com/vicR2fn.png

这是侧边栏上的部分:

     <div style='height: 86px; width: 52px; border: 0px; margin-top: -172px; margin-left: 470px;'><img height='86px' src='http://files.tinkatollidunes.com/nav/quests-support.png' width='52px'/>
      </div>
    </center>
        <center>
<div class='supportbutton' style='position:relative; left:334px; top:-86px; margin-bottom: -82px;'>
<a href='http://www.tinkatollidunes.com/p/support-us.html'> <img alt='' class='a' height='86px' src='http://files.tinkatollidunes.com/nav/support.png' width='152px'/> <img alt='' class='b' height='86px' src='http://files.tinkatollidunes.com/nav/supporthover.png' width='152px'/> 
</a> 
</div>
    </center>
    <center>
      <div style='height: 86px; width: 52px; border: 0px; margin-top: -172px; margin-left: 874px;'><img height='86px' src='http://files.tinkatollidunes.com/nav/support-play.png' width='54px'/>
      </div>
    </center>
        <center>
      <div style='height: 86px; width: 142px; border: 0px; margin-top: -86px; margin-right: -1021px;'><a href='http://www.tinkatolli.com/play/'><img height='86' src='http://files.tinkatollidunes.com/nav/play.png' width='142'/></a>
      </div>

【问题讨论】:

  • 对你想要做什么感到困惑。您是否希望侧边栏位于导航栏的顶部?你试过什么了?你也不应该使用内联样式。
  • 我希望支持和​​播放按钮位于指南部分的后面(您会看到文本被按钮覆盖

标签: html image positioning


【解决方案1】:

您可以在 #sidebar-wrapper 样式中去掉 ma​​rgin-top: -25px...

您的 CSS 当前如下所示:

#sidebar-wrapper {
float: right;
margin-right: 21px;
margin-top: -25px;
overflow: hidden;
width: 315px;
word-wrap: break-word;
}

改成这样:

#sidebar-wrapper {
float: right;
margin-right: 21px;
overflow: hidden;
width: 315px;
word-wrap: break-word;
}

【讨论】:

  • 当然,正如其他人指出的那样,您正在以一种非常尴尬的方式做事。但我宁愿回答你的直接问题,也不愿试图引导你走向最佳实践。有时一点一点地学习是最好的方法。祝你好运。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-11-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-01-26
  • 1970-01-01
相关资源
最近更新 更多