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
22 changes: 22 additions & 0 deletions dz3/1.1/способ 1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>способ 1</title>
</head>
<body>
<style type="text/css">
#box {
width:100px;
height:100px;
border:1px solid red;
background-color:orange;
position: relative;
left: 50%;
margin-left: -50px;
}
</style>
<div id="box">
</div>
</body>
</html>
20 changes: 20 additions & 0 deletions dz3/1.1/способ 2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>способ 2</title>
</head>
<body>
<style type="text/css">
#box {
width:100px;
height:100px;
border:1px solid red;
background-color:orange;
margin: 0 auto;
}
</style>
<div id="box">
</div>
</body>
</html>
24 changes: 24 additions & 0 deletions dz3/1.1/способ 3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>способ 3</title>
</head>
<body>
<style type="text/css">
body {
text-align: center;
}
#box {
width:100px;
height:100px;
border:1px solid red;
background-color:orange;
margin: 0 auto;
text-align: left;
}
</style>
<div id="box">
</div>
</body>
</html>
34 changes: 34 additions & 0 deletions dz3/1.1/способ 4.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>способ 4</title>
</head>
<body>
<style type="text/css">
#box {
width:100px;
height:100px;
border:1px solid red;
background-color:orange;
margin: 0 auto;
text-align: left;
}
#left {
position: relative;
right: 50%;
}
#right {
position: relative;
z-index: 1;
right: -50%;
}
</style>
<div id="box">
</div>
<div id="left">
</div>
<div id="right">
</div>
</body>
</html>
24 changes: 24 additions & 0 deletions dz3/1.1/способ 5.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>способ 5</title>
</head>
<body>
<style type="text/css">
<style>
table {
border-collapse: collapse;
wight: 100%
}
</style>
<table align="center">
<tr>
<td>
<div style="width:100px; height:100px; border:1px solid red; background-color:orange;">
</div>
</td>
</tr>
</table>
</body>
</html>
28 changes: 28 additions & 0 deletions dz3/1.1/способ 6.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>способ 6</title>
</head>
<body>
<style type="text/css">
#left {
float:left;
width:50%;
height:100px;
margin-left: -50px;
}
#box {
width:100px;
height:100px;
border:1px solid red;
background-color:orange;
float:left
}
</style>
<div id="left">
</div>
<div id="box">
</div>
</body>
</html>
25 changes: 25 additions & 0 deletions dz3/1.2/способ 1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>способ 1</title>
</head>
<body>
<style type="text/css">
#box {
text-align:center;
}
#abz {
display: inline-block;
height:100px;
border:1px solid red;
background-color:orange;
}
</style>
<div id="box">
<p id="abz">
Выровнять элемент с высотой 100px и шириной по содержимому (какой-нибудь текст) по центру страницы по горизонтали всеми возможными способами.
</p>
</div>
</body>
</html>
26 changes: 26 additions & 0 deletions dz3/1.2/способ 2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>способ 1</title>
</head>
<body>
<style type="text/css">
#abz {
display: inline-block;
height:100px;
border:1px solid red;
background-color:orange;
}
</style>
<table>
<tr>
<td align="center">
<div id="abz">
Выровнять элемент с высотой 100px и шириной по содержимому (какой-нибудь текст) по центру страницы по горизонтали всеми возможными способами.
</div>
</td>
</tr>
</table>
</body>
</html>
28 changes: 28 additions & 0 deletions dz3/2.1/2.1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Одна колонка 300 px, вторая оставшееся место</title>
</head>
<body>
<style type="text/css">
#box {
width:300px;
height:600px;
border:1px solid red;
float:left;
}
#right{
height:600px;
border:1px solid green;
margin: 0 auto 0 320px;
}
</style>
<div id="box">
Колонка № 1: 300 пикселей
</div>
<div id="right">
Колонка № 2: резиновая
</div>
</body>
</html>
32 changes: 32 additions & 0 deletions dz3/2.2/2.2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Одна колонка от 150 px до 300 px, вторая оставшееся место</title>
</head>
<body>
<style type="text/css">
#box {
width:100%;
max-width:300px;
min-width:150px;
height:600px;
border:1px solid red;
float:left;
margin:0 auto;
}
#right{
height:600px;
border:1px solid green;
margin: 0 auto;
width:100%;
}
</style>
<div id="box">
Колонка № 1: от 150 до 300 пикселей
</div>
<div id="right">
Колонка № 2: резиновая
</div>
</body>
</html>