
DIV+CSS、dreamweaver新手提问,帮忙看一下,不知道哪里出错了。
代码:<divid="search"><inputname="text"type="text"class="srh_text"/><inputname="btn"type...
代码:
<div id="search">
<input name="text" type="text" class="srh_text"/><input name="btn" type="submit" value="" class="srh_btn" />
</div>
CSS样式:
#search { float:right; margin-top:54px; overflow:hidden;}
.srh_text { background:url(img/srh_text.gif) no-repeat 0 0; padding-left:10px; width:154px; height:25px;border:none;}
.srh_btn { background:url(img/srh_btn.gif) no-repeat 0 0; width:64px; height:25px; border:none;}
#search * { vertical-align:middle;}
刚开学这个,代码是这样的,但是总是这个地方出错,不知道是怎么回事,麻烦熟手指点一下,万分感激。 展开
<div id="search">
<input name="text" type="text" class="srh_text"/><input name="btn" type="submit" value="" class="srh_btn" />
</div>
CSS样式:
#search { float:right; margin-top:54px; overflow:hidden;}
.srh_text { background:url(img/srh_text.gif) no-repeat 0 0; padding-left:10px; width:154px; height:25px;border:none;}
.srh_btn { background:url(img/srh_btn.gif) no-repeat 0 0; width:64px; height:25px; border:none;}
#search * { vertical-align:middle;}
刚开学这个,代码是这样的,但是总是这个地方出错,不知道是怎么回事,麻烦熟手指点一下,万分感激。 展开
5个回答
展开全部
建议你使用火狐浏览器的firebug来调整页面的布局、排版的css问题,相当实用方便,我敢肯定,只要你敢去用,那么你一定会爱上它。但是它并不能够解决兼容性问题,只能让你先得到一个正确的页面,在其他浏览器中出现的问题,再找相应的hack就好了。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, form, span, img, dl, dt, dd, table, th, td, blockquote, fieldset, div, strong, label, em {
margin:0;
padding:0;
border:0;
}
以后在制作网页的时候加上这段CSS,就能有效解决这些间距问题。
margin:0;
padding:0;
border:0;
}
以后在制作网页的时候加上这段CSS,就能有效解决这些间距问题。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
有些元素自动就有margin属性,css开始位置打上一个*{margin:0;padding:0;}试试
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
因为ie浏览器的兼容性问题,我建议每个input的外面再加一个div来控制其位置。比如:
<div id="search">
<div class=""><input xxxxx/></div>
<div class=""><input type="button"></div>
</div>
<div id="search">
<div class=""><input xxxxx/></div>
<div class=""><input type="button"></div>
</div>
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
加一个大div不让它浮动,clear:both
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询