Jump to content

not able to place image at top left


a65

Recommended Posts



<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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.