Problems to visualize CSS on HTML code [closed]
The CSS doesn't apply to this code and for a big ironoy in IE i could barely visualize but in the others no, what do you think is happen?
<html lang="en"开发者_如何转开发 xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title father="*head" id="ttl">aadsnfasjnsadgasg</title>
<link father="*head" href="http://www.bmsuite.com/modules/mika/css/main.css" id="mika_css" rel="Stylesheet" type="text/css"/>
</head>
<body id="body" key="40f8471224aafe869b3e13414c5cb6514dd014d2">
<DIV class="ui-draggable" id="1div"></DIV>
<INPUT class="ui-draggable" id="1input"/>
<LABEL class="ui-draggable" id="1label">Nombre:</LABEL>
</body>
</html>
(This seems to be the CSS)
#body{
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background-color: silver;
}
#1div{
position: absolute;
width: 200px;
height: 100px;
background-image: initial;
background-attachment: initial;
background-origin: initial;
background-clip: initial;
background-color: rgb(92, 156, 204);
top: -21px; left: 218px;
background-position: initial initial;
background-repeat: initial initial;
:undefined;
}
#1div{
position: absolute;
background-image: initial;
background-attachment: initial;
background-origin: initial;
background-clip: initial;
background-color: rgb(92, 156, 204);
width: 900px;
height: 100%;
top: 0px;
left: 218px; background-position: initial initial;
background-repeat: initial initial;
}
#body{
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background-color: silver;
}
#1label{
position: absolute;
top: 190px;
left: 352px;
:undefined;
}
#body{
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background-color: silver;
:undefined;
}
IDs and Classes cannot start with numbers. You need to use the word 'one' instead of '1' if you must number the div, input & label. Your current CSS rules will be ignored because they start with a number which is invalid.
Failing that, try changing: rel="Stylesheet"
to rel="stylesheet"
some browsers might not like your capitalization of 'stylesheet'.
Also, you define the rules for #body
three times in your CSS which is pointless. The browser will use whichever rules come last. Also, you should try to combine your rules for #1div
because most of that is redundant. Many of the rules in this CSS are setting the default values which isn't necessary.
精彩评论