Search code examples
htmlcssstylesheetdtd

Inline style does not givnig it's effect


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">



<head>
<title>New Page</title>
</head>
<body>


<input type='text' id='Textbox1' name='Textbox' value='Test' maxlength=20  style='left:194; top:43; width:100; height:32; font-family:Arial; font-style:normal; font-weight:normal; font-size:14; color:#000000; text-align:left; letter-spacing:0; line-height:0; position:absolute; padding:0; margin:0;   ' />
<button  id='4df60b2d1cf696913aec0377' id='Button1' name='Button' style='left:193.5; top:237.5; width:100; height:32; font-family:Arial; font-style:normal; font-weight:normal; font-size:14; color:#000000; text-align:center; letter-spacing:0; line-height:0; position:absolute; padding:0; margin:0; '>Submit</button>
<a name='Anchor' id='Anchor1'href='http://www.google.com' target='_blank' style='left:42.5; top:38.5; width:100; height:32; font-family:Arial; font-style:normal; font-weight:normal; font-size:14; color:#000000; text-align:left; letter-spacing:0; line-height:0; position:absolute; padding:0; margin:0; ' >link</a>
<img name='Img' id='Img1' src='i4.jpg' alt='Image not Display' style='left:79.5; top:195.5; width:100; height:32; font-family:Arial; font-style:normal; font-weight:normal; font-size:14; color:#FFFFFF; text-align:left; letter-spacing:0; line-height:0; position:absolute; padding:0; margin:0; '></img>
</body>
</html>

this HTML code doesn't getting proper in browser in terms of top-left where i'm making mistakes


Solution

  • Please put px after non-zero numeric values for it to work.

    example: height: 100px;