Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions 1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<!DOCTYPE html>
<html>
<head>
<meta content='text/css' charset='utf-8'/>
<title>Выравнивание</title>
<style>
body {
margin:0;
padding:0;
}
div.first {
background-color: #ccff99;
width: 100px;
height: 100px;
margin: auto
}
div.container1 {
float: left;
width: 50%;
padding-left: 50px;
}
div.second {
background-color: #cc99cc;
float:right;
width: 100px;
height: 100px;
}
div.container2 {
width: 50%;
padding-right: 50px;
float: right;
}
div.third {
background-color: #660033;
width: 100px;
height: 100px;
}
div.forth {
background-color: #ffcccc;
width: 100px;
height: 100px;
position: relative;
left:50%;
margin-left: -50px;
}
div.fifth {
background-color: #330033;
width: 100px;
height: 100px;
}
</style>
</head>
<body>
<div align='center'>
<div class='fifth'></div>
</div>
<!-- the one with the table -->
<table width='100%' >
<tr>
<td align='center'>
<div class='third'></div>
</td>
</tr>
</table>
<!-- -->
<div class = 'forth'></div>
<div class = 'first'></div>
<div class = 'container2'>
<div class = 'third'></div>
</div>
<div class = 'container1'>
<div class = 'second'></div>
</div>
</body>
</html>
51 changes: 51 additions & 0 deletions 2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html>
<head>
<meta content='text/css' charset='utf-8'/>
<title>Выравнивание</title>
<style>
body {
margin:0;
padding:0;
}
div.first {
background-color: #ccff99;
height: 100px;
display: table;
margin: 0 auto;
}
td.co {
background-color: #ccccff;
height: 100px;
}
table.co {
margin: 0 auto;
}
div.ext {
float: left;
position: relative;
left:50%
}
div.int {
background-color: #ffff99;
height: 100px;
position: relative;
right: 50%
}
</style>
</head>
<body>
<table class='co'>
<tr>
<td class ='co'>
one does not simply walk into Mordor
</td>
</tr>
</table>

<div class='first'>one does not simply walk into Mordor</div>
<div class='ext'>
<div class='int'>some stuff</div>
</div>
</body>
</html>
24 changes: 24 additions & 0 deletions 3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta content='text/css' charset='utf-8'/>
<title>Колонки</title>
<style>
div.first-f {
float: left;
width: 300px;
background-color: #ffff99;
height: 100px;
}
div.first-s {
width: auto;
background-color: #ccff99;
height: 100px;
}
</style>
</head>
<body>
<div class='first-f'></div>
<div class='first-s'></div>
</body>
</html>
30 changes: 30 additions & 0 deletions bonus1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html>
<head>
<meta content='text/css' charset='utf-8'/>
<title>Бонус</title>
<style>
body {
margin:0;
padding:0;
}
div.container {
height: 100%;

}
div.first {
background-color: #ccff99;
height: 100px;
width: 100px;
position: relative;
top: 50%;
margin-top: -50px;
}
</style>
</head>
<body>
<div class='container'>
<div class='first'></div>
</div>
</body>
</html>