Jump to content
  • 0

Помогите уменьшить код


Ururu
 Share

Question

Вот... как его можно облагородить?

html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title>index</title>
<link rel="stylesheet" type="text/css" href="screen.css"/>
</head>
<body>
<div class="container">
<div class="left">lh</div>
<div class="right">rh</div>
<div class="center">ch</div>
</div>
<div class="addit">s</div>
<div class="break"></div>
<div class="container">
<div class="left">lm</div>
<div class="right">pm</div>
<div class="center">cm</div>
</div>
<div class="break"></div>
<div class="container">
<div class="left">lc</div>
<div class="right">rc</div>
<div class="center">cc</div>
</div>
<div class="break"></div>
<div class="container">
<div class="left">lf</div>
<div class="right">rf</div>
<div class="center">cf</div>
</div>
<div class="break"></div>
</body>
</html>

css

body {
background-color: #E8E8E8;
padding: 0px;
margin: 0px;
min-width: 800px;
font-family: Arial, Helvetica, sans-serif;
}
.container {
width: 100%;
}
.left {
width: 200px;
float: left;
background-color: #008B8B;
height: 50px;
margin: 0px 0px 0px 10px;
}
.center {
background-color: #ff0000;
height: 50px;
margin: 0px 215px 0px 215px;
}
.addit {
background-color: #2E8B57;
height: 50px;
margin: 5px 10px 0px 10px;
}
.right {
width: 200px;
float: right;
background-color: #AB82FF;
height: 50px;
margin: 0px 10px 0px 0px;
}
.break {
width: 100%;
height: 5px;
background-color: #000000;
clear:both;
}

Edited by Ururu
Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0
придумал гениальнейший вопрос!

как поменять кодировку в файле, если у меня он сохраняет только (максимум) в koi8r

По поводу кода, как его облагородить.. вы слишком увлекаетесь тегом <div>, а ведь на htmlbooke в справочнике есть прекрасные описания и других тегов.

Edited by lancer
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy