Skip to content

Instantly share code, notes, and snippets.

@cycyewt
Created August 29, 2013 12:44
Show Gist options
  • Save cycyewt/6377591 to your computer and use it in GitHub Desktop.
Save cycyewt/6377591 to your computer and use it in GitHub Desktop.
t grid
<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<title>grid</title>
<link rel="stylesheet" href="./assets/css/ju-base.css">
<style type="text/css" media="screen">
.t-grid {
margin: 10px auto;
width: 1000px;
}
.t-grid-east,
.t-grid-west {
position: relative;
}
.t-grid-aside {
position: absolute;
top: 0;
width: 235px;
height: 300px;
background-color: red
}
.t-grid-east .t-grid-aside {
left: 0;
}
.t-grid-west .t-grid-aside {
right: 0;
}
.t-grid-content {
height: 350px;
background-color: red
}
.t-grid-east .t-grid-content {
width: 750px;
margin-left: 250px;
}
.t-grid-west .t-grid-content {
width: 750px;
margin-right: 250px;
}
</style>
</head>
<body>
<div class="t-grid t-grid-east">
<div class="t-grid-aside"></div>
<div class="t-grid-content"></div>
</div>
<div class="t-grid t-grid-west">
<div class="t-grid-aside"></div>
<div class="t-grid-content"></div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment