Johnson
Johnson

Reputation: 818

making this right in html

Hello i tried hard to make exactly like this: http://i55.tinypic.com/2j31fg3.png

But it's difficult for me, and its not right at all. My boxes arent so perfect as in the image, and same with the text under it.

<table border="0" align="center" cellspacing="2" cellpadding="2" >
                    <tr >
            <td class="cell" style="color: #CCC; font-size: 10px;">
            <input type="text" value="Email"></td>
            <td class="cell" style="color: #CCC; font-size: 10px;">
            <input type="text" value="Lösenord"></td>
                    </tr>
                    <tr align="center" >
                    <td class="cell" style="color: #CCC; font-size: 10px;">Glömt lösenord</td>
                    <td class="cell" style="color: #CCC; font-size: 10px;">Kom ihåg</td>
                    </tr>
                </table>

What have I done wrong? / am i missing?

Upvotes: 0

Views: 54

Answers (1)

John Hartsock
John Hartsock

Reputation: 86882

Hopefully this gets you started. The layout is easier to manage this way. Use CSS to position elemnts and divs as necessary.

<html>
<head>
<style>
   body {
     color: #CCC; 
     font-family: Arial;
     font-size: 12px;
     background-color: #000000;
   }
   #check {
     margin-left: 14px;
     margin-top: 5px;
   }
   #left,  #right {
     margin: 1px;
     float:left;
   }
   #leftspan, #rightspan {
     margin: 1px;
     margin-top: 8px;
     float:left;
   }
   #leftinput, #rightinput {
     display:block;
   }
</style>
</head>
<body>
  <div id="left">
    <input id="leftinput" type="text"  value="Password" />
    <span id="leftspan">GLEMT ADGANGSKODE</span>
  </div>
  <div id="right">
    <input id="rightinput" type="text"  value="Email" />
    <span id="rightspan">HAII MIG INLOGGAD</span>
     <input id="check" type="checkbox">
  </div>
</body>
</html>

Upvotes: 1

Related Questions