adrian каза:
е напълно достатъчно и работи без проблеми под всички браузъри. Предимствата са:
1. По-малък размер на файла (въпреки, че едва ли има значение 20 символа по-малко).
2. Помни се изключително лесно
С това е добре, с другите ми дава по още 30 грешки. Възникнаха няколко други проблема: дизайна се прецаква - получава се един margin около 15px най-отгоре, div class error няма фон и... това е
css-а ми е това:
[css]body{margin:0px;padding:0px;background:url('../images/background.PNG') repeat;font-family:Arial;}
img{border:0px;}
a{color:#04006b;font-family:Tahoma;}
a:visited{color:#04006b;font-family:Tahoma;}
a:hover{color:#000000;}
#wrap{width:1120px;margin:0px auto;padding:0px auto;font:13px;color:#000000;font-family:Arial;margin-top:0px;}
#header{width:1109px;height:106px;background:url('../images/header.PNG');background-repeat:no-repeat;text-align:center;margin:0px auto;margin-top:0px;}
#header h1{color:#ffffff;font-size:50px;font-family:Comic Sans MS;}
#menu{width:1119px;height:50px;margin-bottom:10px;margin-top:10px auto;background:url('../images/menu.PNG');background-repeat:no-repeat;}
#menu ul{padding-left:15px;margin-top:10px;width:1000px;}
#menu ul li{height:48px;margin-top:1px;list-style:none;list-style-type:none;padding-left:20px;padding-right:20px;padding-top:13px;font-family:Tahoma;text-align:center;width:auto;float:left;}
#menu ul li:hover{background:url('../images/menu_h.PNG');background-repeat:repeat-x;color: #0101A7;}
#menu ul li a,a:visited{color:#ffffff;text-decoration:none;font:Tahoma;font-size:18px;}
#menu ul li a:hover{color: #0101A7;}
#left{width:200px;float:left;}
#right{width:200px;float:right;}
#middle{width:700px;float:left;}
#content{width:690px;height:auto;margin:0 auto;margin-left:11px;}
.sidebox_top{width:194px;height:37px;line-height:37px;padding-left:5px;background:url('../images/sidebox_top.PNG');background-repeat:no-repeat;color:#ffffff;font-size:16px;font-family:Arial;}
.sidebox_mid{width:194px;background:url('../images/sidebox_mid.PNG');background-repeat:repeat-y;padding-left:2px;font-family:Arial;}
.sidebox_bot{width:194px;height:3px;background:url('../images/sidebox_bot.PNG');background-repeat:no-repeat;}
.midbox_top{width:690px;height:36px;line-height:36px;background:url('../images/midbox_top.PNG');background-repeat:no-repeat;padding-left:10px;color:#ffffff;font-size:16px;font-family:Tahoma;}
.midbox_mid{width:690px;background:url('../images/midbox_mid.PNG');background-repeat:repeat-y;padding:5px;}
.midbox_bot{width:690px;height:2px;background:url('../images/midbox_bot.PNG');background-repeat:no-repeat;}
.ads{margin:0px auto;width:470px;height:62px;padding-top:2px;padding-bottom:1px;padding-left:2px;padding-right:1px;background:url('../images/box.PNG');}
#footer{width:1099px;height:52px;line-height:52px;text-align:center;background:url('../images/footer.PNG') no-repeat;margin:10px auto;color:#3d3d3d;font-size:13px;}
#left .error{border:1px solid #b80000;color:#b80000;background:#ffdbdb;width:182px;padding:3px;margin-top:2px;}
#right .error{border:1px solid #b80000;color:#b80000;background:#ffdbdb;width:182px;padding:3px;margin-top:2px;}
.error{border:1px solid #c90000;color:#b80000;background:#ffdbdb url('../images/warning.png') no-repeat 5 7;height:60px;padding:5px;padding-left:70px;width:600px;line-height:60px;}[/css]
а html-a:
HTML:
<!DOCTYPE html>
<html>
<head>
<title>title</title>
<link rel="stylesheet" href="template/style.css" media="screen" />
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<link rel="icon" type="image/x-icon" href="images/favicon.gif" />
<script type="text/javascript" src="jquery.js"></script>
</head>
<body>
<div id="wrap">
<div id="header"><h1>header</h1></div>
<div style="clear:both;height=10px;"> </div>
<div id="menu">
<ul>
<li><a href="index">Начало</a></li>
<li><a href="index">Клипове</a></li>
<li><a href="index">Категории</a></li>
<li><a href="index">Новини</a></li>
</ul>
</div>
<div style="clear:both;"></div>
<div id="left">
<div class="sidebox_top">Потребителски панел</div>
<div class="sidebox_mid">
<form method="post" action='?p=login'>
<input type="text" name="user" style="width:183px;" class="login" value="Потребител" OnFocus="if(this.value=='Потребител') this.value='';" OnBlur="if(this.value=='') this.value='Потребител';" />
<input type="password" name="password" style="width:183px;" class="login" onfocus="this.value=''" value="****" OnFocus="if(this.value=='****') this.value='';" OnBlur="if(this.value=='') this.value='****';" /><br />
<input type="image" src="images/loginimg.png" name="" /><br /><a href="index?p=register">Регистрация</a>
</form>
<br />
</div>
<div class="sidebox_bot"></div>
</div>
<div id="middle">
<div id="content">
<div class="midbox_top">Последни новини</div>
<div class="midbox_mid">
//last news query
</div>
<div class="midbox_bot"></div>
<div class="midbox_top">Последни филми</div>
<div class="midbox_mid">
//last movies query
</div>
<div class="midbox_bot"></div>
</div>
</div>
<div id="right">
<div class="sidebox_top">Статистика</div>
<div class="sidebox_mid">
right box
</div>
<div class="sidebox_bot"></div>
</div>
<div style="clear:both;"></div>
<div id="footer">Всички права запазени.</div>
</div>
</body>
</html>
получават се и тези грешки:
Line 28, Column 119: Duplicate attribute onfocus.
…s="this.value=''" value="****" OnFocus="if(this.value=='****') this.value='';"…
Line 29, Column 57: Element input is missing required attribute alt.
…e" src="images/loginimg.png" name="" /><br /><a href="index?p=register">Регист…
Attributes for element input:
Global attributes
accept
alt
autocomplete
autofocus
checked
dirname
disabled
form
formaction
formenctype
formmethod
formnovalidate
formtarget
height
list
max
maxlength
min
multiple
name
pattern
placeholder
readonly
required
size
src
step
type
value
width