好吧,這裏是我的問題,我有一個網站,在中間我有一個部分和一邊。網頁上的所有其他內容都是100%,但是該部分和旁邊我希望等於80%,並且我在中間彼此相鄰。但是我得到了這個。我的div不會去中間
IMAGE:https://twitter.com/iamalecgrogan/status/392454057345810432/photo/1
你開始說的東西之前,我曾嘗試每一件事情做表單元格和表格verticaly對齊和在線塊elemets創建一個div爲他們進入。但沒有任何工作,請幫助。這是我的代碼。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>
Home | ProvideWebDesign
</title>
<link rel="stylesheet" type="text/css" href="styles/layout.css">
<link rel="stylesheet" type="text/css" href="styles/style.css">
</head>
<body>
<div id="wrapper">
<header id="header">
<div id="header_right">
</div>
<div id="header_left">
</div>
</header>
<nav id="nav">
</nav>
<section id="section">
<article id="section_article">
</article>
<article id="section_article2">
</article>
</section>
<aside id="aside">
<article id="aside_article">
</article>
<article id="aside_article2">
</article>
<article id="aside_article3">
</article>
</aside>
<footer id="footer">
<div id="footer_right">
</div>
<div id="footer_left">
</div>
</footer>
</div>
</body>
</html>
CSS--------------------
*
{
margin: 0px;
padding: 0px;
}
#wrapper
{
width: 100%;
height: 875px;
display: table;
}
#header
{
width: 100%;
height: 75px;
display: block;
}
#header_right
{
width: 50%;
height: 75px;
float: left;
display: block;
}
#header_left
{
width: 50%;
height: 75px;
float: left;
display: block;
}
#nav
{
width: 100%;
height: 50px;
display: block;
}
#section
{
width: 60%;
height: 600px;
float: left;
display: table-cell;
}
#aside
{
width: 20%;
height: 600px;
float: left;
display: table-cell;
}
#footer
{
width: 100%;
height: 150px;
display: block;
clear: both;
}
#footer_right
{
width: 50%;
height: 150px;
float: left;
display; block;
}
#footer_left
{
width: 50%;
height: 150px;
float: left;
display: block;
}
你忘了發佈的CSS樣式。請創建一個[jsfiddle](http://jsfiddle.net/)。 – Gigo
什麼?我是新來堆棧流 –
好吧,我們需要layout.css和style.css的內容。 – Gigo