程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长


+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

暂无数据

设置图像与第一个内联

发布于2022-06-13 10:33     阅读(1230)     评论(0)     点赞(19)     收藏(0)


我如何设置图像“LeftSpacer”和“RightSpacer”内联而没有
但仍然留在页面“Wrapper”我需要“LeftSpacer”如果它是和“RightSpace”与“LeftSpacer”内联但一直到正确的。

<html> 
<head> 

<style type="text/css">
<!--
body {
  text-align:center; /* for IE */
  margin:0 auto; /* for the rest */
  background-color: #ffffff;
}

#Wrapper{
  width: 1000px;
}

div#wrapper {
  text-align:left;
  width:1000px; /* or a percentage, or whatever */
}

    /*End Page Wrapper*/

#Header {
  width: 100%;
  height: 100%;
  background: url("http://www.web-designer-ga.com/Pics/top.gif") no-repeat 0 0;
}

#LeftSpacer { 
  width: 14px;
  height: 24px; 
  background: url("http://www.web-designer-ga.com/Pics/btn_lft.gif") no-repeat 0 0; 
}

#RightSpacer {
  width: 100%;
  height: 100%; 
  background: url("http://www.web-designer-ga.com/Pics/btn_rgt.gif") no-repeat 0 0;
}

-->
</style>

</head> 

<body>

  <div id="Wrapper">

    <div id="Header"></div> 

        <div id="LeftSpacer"></div>

        <div id="RightSpacer"></div>

  </div>

</body> 
</html> 

解决方案


You could give Leftspacer and Rightspacer a common class, like: class="spacers" and then set the css value to float:right or display:inline




所属网站分类: 技术文章 > 问答

作者:黑洞官方问答小能手

链接:http://www.qianduanheidong.com/blog/article/370281/f2519816b64a42fd3f86/

来源:前端黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

19 0
收藏该文
已收藏

评论内容:(最多支持255个字符)