开发者

assign min-width

开发者 https://www.devze.com 2023-01-26 10:21 出处:网络
I\'ve my HTML code as below <div id=\"header\"> <div id=\"wrapHeader\"> <div id=\"logo\"></div>

I've my HTML code as below

<div id="header">
    <div id="wrapHeader">
        <div id="logo"></div>
        <div id="toolbar"></div>
    </div>
</div>

And the CSS as

#header{
    height: 55px;
}

#wrapHeader{
    height: 50px;
    min-width: 960px;
    margin: 0 auto;
}

#logo{
    float: left;
    width: 125px;
    height: 50px;
}

#toolbar{
    width: 800px;
    height: 50px;
    float: right;
}

Here, logo width = 125px & #toolbar width = 800px;

What I want is, when the browser is resized, I want to stop the fluid structure at 960px (which I tried by declaring min-width = 960px at #wrapHeader although I'm not sure if it's the right way to do). Right away, I don't want to give the #wrapHeader width as 960px as it won't expand the #logo开发者_开发技巧 and #toolbar as the screen expands.

Kindly help.


Maybe you should add the mind-width to a html definition.

html {
min-width: 960px;
}    
0

精彩评论

暂无评论...
验证码 换一张
取 消