Jump to content
  • 0

Валидация w3c


klanessia
 Share

Question

При валидации на w3c заметил ошибку:


Line 9, Column 36: The align attribute on the div element is obsolete. Use CSS instead.
<div id="page-wrap" align="center">

Когда align переношу в CSS выходит такое:


#page-wrap Свойство align не существует : center center

Как правильно сделать, что бы пройти валидацию?

index.html


<!DOCTYPE html>
<html>
<head>
<title>Лестница</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="./css/style.css">
</head>
<body>
<div id="page-wrap">
<img src="./images/circle.png" alt="logo">
</div>
</body>
</html>

style.css


* {
margin: 0;
padding: 0;
}
body {
background: #ccc;
}

#page-wrap {
width: 960px;
margin: 50px auto;
align: center;
}

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

простите а что это у вас за свойство такое align !? чего выравнивание?

Ага это если текста то text-align, или margin:0 auto, и задать ширину, если ровнять блок.

Спасибо, валидацию прошел. Помог margin: 0 auto

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