如何恢复我的网站时看起来一样?

时间:2014-04-28 13:01:22

标签: html css

我的网站在页面最大化时看起来很好但在恢复时很差,我该如何解决这个问题?基本上,当我恢复时,我网站上的框会变形。我是网站设计的新手。我的编码如下:

.boxed {
        position: absolute;
        left: 500px;
        right: 180px;
        border: 4px solid green;
        font-size: 2em;
        text-align: center; 
        }

建议?

2 个答案:

答案 0 :(得分:0)

.boxed {
            position: relative;
            left: 10%;
            right: 180px;
            border: 4px solid green;
            font-size: 2em;
            text-align: center;
            width:48%;
            overflow:hidden;
        }

将此替换为你的

答案 1 :(得分:0)

The Box
该框覆盖图像,并使图像被边框阻挡。你可以考虑使用px或类似的东西来修正宽度和高度,只要确保它不会overflow它应该是它的位置。

e.g。将其添加到您的盒子中'式

width: 500px;
height: auto; /*For the height auto will be okay*/
white-space: pre-wrap /*Line-break*/
display:inline-block;

而且,这可能会改善您的网站。