div css控制 [英] div css control

查看:81
本文介绍了div css控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试重新做我网站上的所有内容,因此它是整齐有序的代码,其中包括重新执行我的CSS。我已经意识到可以通过其他方式克服的问题但是如果我能在这里做的话会更容易。

这是我的一些CSS:

I am trying to re-do everything on my site so it is all neat and organized code, which includes re-doing my css. I have realized a problem that can be overcome in other ways but it would be easier if I could do it here.
Here is some of my css:

展开 < span class =codeDivider> | 选择 | Wrap | Line数字

推荐答案

所以身体是100%的什么?你还需要将html设置为100%。


''width''是内容的宽度。边框,边距和填充都在宽度之外。
So body is 100% of what? You need to set html to 100%, also.

''width'' is the width of the content. Borders, margin and padding are outside the width.


好的,所以没有简单的方法可以为主体或html设置一个宽度,其余部分自动完成边框,填充和边距?


还有一个快速说明:我使用的编辑器(phpDesigner)不会将html识别为css类,就像它的身体一样? html是一个正常的类来定义吗?除了使用minheight(我永远无法在IE中工作)之外还可以做其他事情来高度使用它吗?
OK, so there is no easy way to have one width for the body, or html, and the rest is done automatically when the rest includes borders, padding and margins?

And just a quick note: The editor I am using (phpDesigner) doesn''t recognise html as a css class like it does body? Is html a normal class to define? And besides using minheight (I can never get it to work in IE) can something else be done to height to use it like that?


我只设置html,body {height:100%在我的CSS中。最初,IE不允许在< html>上设置样式。但我认为这是在IE7中修复的。


通过IE6,最小高度不起作用,IE将高度视为最小高度。但那是你的IE浏览器。当它与高度结合时,IE7仍会将其搞砸。


谷歌对于Diaz min-height hack。
I just set html,body{height:100%} in my css. Originally, IE would not allow setting styles on <html> but I think that''s fixed in IE7.

Up through IE6, min-height did not work and IE treated height as min-height. But that''s IE for you. IE7 still screws it up when it''s combined with height.

Google for Diaz min-height hack.


这篇关于div css控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆