gpt4 book ai didi

css - 如何更改此 CSS 代码以获得所需的布局

转载 作者:行者123 更新时间:2023-11-28 13:53:21 24 4
gpt4 key购买 nike

以下是我的 CSS 代码。使用此代码,我得到 100px 宽度的左右菜单,以及 700px 宽度的中间内容。 (总宽度900px。)但是,我的要求是左右侧边栏100px宽度,中间内容800px宽度。 (总宽度 1000px。)应该如何更改以下 CSS 代码来做到这一点?我尽力了,但在改变值(value)时它搞砸了。

html,
body {
margin: 0;
padding: 0;
margin: 0 100px;
background: url("assets/bg_paper.jpg") repeat-x;
}
body {
font: 76% arial,sans-serif;
text-align: center;
}
p { margin: 0 10px 10px }
a {
display: block;
color: #981793;
padding: 10px;
}
div#header h1 {
height: 80px;
line-height: 80px;
margin: 0;
padding-left: 10px;
background: #ffffff;
color: #79B30B;
}
div#container { text-align: left }
div#content p { line-height: 1.4 }
div#navigation { background: #ffffff }
div#extra { background: #FFffff }
div#footer {
background: #ffffff;
color: #FFF;
}
div#footer p {
margin: 0;
padding: 5px 10px;
}
div#container {
width: 900px;
margin: 0 auto;
}
div#wrapper {
float: left;
width: 100%;
}
div#content { margin: 0 100px }
div#navigation {
float: left;
width: 100px;
margin-left: -900px;
}
div#extra {
float: left;
width: 100px;
margin-left: -100px;
}
div#footer {
clear: left;
width: 100%;
}

<!---- language:HTML-------->
<body>
<div id="container">
<div id="header"><h1>Header</h1></div>
<div id="wrapper">
<div id="content">
<p><strong>1) Content here.</strong> column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.</p>
<p>very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column </p>
<p>fill long make long text very make long fill column make text very silly column filler silly text fill text filler filler filler make make make make text filler fill column filler make silly make text text fill make very filler column very </p>
<p>column text long column make silly long text filler silly very very very long filler fill very fill silly very make make filler text filler text make silly text text long fill fill make text fill long text very silly long long filler filler fill silly long make column make silly long column long make very </p>
</div>
</div>
<div id="navigation">
<p><strong>2) Navigation here.</strong> long long fill filler very fill column column silly filler very filler fill fill filler text fill very silly fill text filler silly silly filler fill very make fill column text column very very column fill fill very silly column silly silly fill fill long filler </p>
</div>
<div id="extra">
<p><strong>3) More stuff here.</strong> column long make silly silly filler silly very very very long column filler fill make column make silly column fill silly column long make silly filler column filler silly long long column fill silly column very </p>
</div>
<div id="footer"><p>Here it goes the footer</p></div>
</div>
</body>

最佳答案

试试这个

div#container {
width: 1000px;
margin: 0 auto;}

希望这会有所帮助!!或回复我..

关于css - 如何更改此 CSS 代码以获得所需的布局,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11150627/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com