用CSS给Asp.net控件定位_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:40:37
Original
1269 people have browsed it

css

用居中的代码给
元素定位没有问题,能居中,
给Asp.net的Label控件定位就不能实现了,求解
.title { margin:0px auto; width:80%; }
Copy after login

回复讨论(解决方案)

肯定是周围的元素 限制了 。可以 设置 border:1px solid red 看看 到底是怎么回事

debug一下看看服务器控件生成后的代码是什么样的
其次 注意元素的display默认属性 比如div默认是block 而label是inline等等

呵呵,搞明白了,想给label布局,开始直接对label用的样式,这样布局不起作用,直接在外面加了div,上面的布局就行了

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!