Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dz_3 #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Dz_3 #13

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
83 changes: 83 additions & 0 deletions 1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<html>
<head>
<meta content='text/css' charset='utf-8'/>
<title>Выравнивание элемента 10to10 по центру по горизонтали</title>
<style type="text/css">
body {
padding:20;
}
div.xx1 {
background: #FF0000;
width: 100 px;
height: 100 px;
margin: auto;
}
div {
background: #6495ED;
width: 100 px;
height: 100 px;
}
div.xx4 {
background: #00008B;
width: 100px;
height: 100px;
position: relative;
left:50%;
margin-left: -50px;
}
div.xx5 {
width:100px;
height:100px;
background:#9ACD32;
position: absolute;
left: 50%;
margin-left: -50px;
}
div._center
{
background: #FFFFFF;
position: relative;
width: 100%;
}
div._left
{
background: #FFFFFF;
position: relative;
right: 50%;
float: right;
}
div._right
{
position: relative;
z-index: 1;
right: -50%;
}
</style>
</head>
<body >
<!--Первый-->
<div class = 'xx1'></div>
<!--Второй-->
<table width="100px" align="center">
<tr>
<td> <div></div> </td>
</tr>
</table>
<!--Третий-->
<div class = 'xx4'></div>
<!--Четвертый-->
</div>
<div class="_center">
<div class="_left">
<div class="_right" style="margin: 1em 0;">
</div>
</div>
</div>
<!--Пятый-->
<div class = 'xx5'></div>
</body>
</html>




41 changes: 41 additions & 0 deletions 2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<html>
<head>
<meta content='text/css' charset='utf-8'/>
<title>Выравнивание элемента 10toY c текстом по центру по горизонтали</title>
<style>
body {
padding:20;
}
div._11 {
float: left;
position: relative;
left:50%
}
div._22 {
background: #00FA9A;
height: 100px;
position: relative;
right: 50%
}
div._33 {
display: inline-block;
height:100px;
background:#9ACD32;
}
</style>
</head>
<body>
<!--Первый-->
<table align="center">
<tr>
<td>
<div class='_33'>YellowGreen</div>
</td>
</tr>
</table>
<!--Второй-->
<div class='_11'>
<div class='_22'>MediumSpringGreen</div>
</div>
</body>
</html>
26 changes: 26 additions & 0 deletions 3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<html>
<head>
<meta content='text/css' charset='utf-8'/>
<title>Две колонки (300px и все остальное)</title>
<style>
body {
margin: 0;
padding:0;
}
div._11 {
background: #00FA9A;
width:300px;
height:1000px;
float:left;
}
div._22 {
background:#9ACD32;
height:1000px;
}
</style>
</head>
<body>
<div class='_11'></div>
<div class='_22'></div>
</body>
</html>
27 changes: 27 additions & 0 deletions 4.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<html>
<head>
<meta content='text/css' charset='utf-8'/>
<title>Две колонки (300px и все остальное)</title>
<style>
body {
margin: 0;
padding:0;
}
div._11 {
background: #00FA9A;
max-width:300px;
min-width:150px;
height:1000px;
float:left;
}
div._22 {
background:#9ACD32;
height:1000px;
}
</style>
</head>
<body>
<div class='_11'></div>
<div class='_22'></div>
</body>
</html>