a65 Posted January 12, 2013 Share Posted January 12, 2013 <div id="logo"><img src="logo.jpg"</div> <div id="login">login page </div> <table> <tr><td >Name</td><td width><input type=text name=myname></td></tr> <tr><td>Age</td><td><input type=text name=myage></td></tr> <tr> <td> </td> <td><input type=submit value=submit> <input name="Reset" type=reset value=Reset></td> </tr> </table> </div> css code is #logo { float:left; width: 50px; height:10px; } #login { width:100%; font:"Courier New", Courier, mono; font_size:50px; height:50px; margin_left:150px; background:blue; margin_top:10px; Link to comment https://forums.phpfreaks.com/topic/273062-not-able-to-place-image-at-top-left/ Share on other sites More sharing options...
Love2c0de Posted January 12, 2013 Share Posted January 12, 2013 Can you explain a little more about the problem, your question is very vague. The image is displaying in the top left corner already. You left out the closing '/>' on your <img> tag and also some of the <input tags. I've added double quotes around your HTML attribute values also. I updated your code: <div id="logo"><img src="logo.jpg" alt="yourImg" /></div> <div id="login">login page</div> <table> <tr> <td >Name</td> <td width><input type="text" name="myname"></td> </tr> <tr> <td>Age</td> <td><input type="text" name="myage"></td> </tr> <tr> <td> </td> <td><input type="submit" value="submit" /><input name="Reset" type="reset" value="Reset" /></td> </tr> </table> </div> Also, there is an extra closing div </div> tag, but not opening div. Post your full code please Regards, L2c. Link to comment https://forums.phpfreaks.com/topic/273062-not-able-to-place-image-at-top-left/#findComment-1405162 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.