tags:

views:

40

answers:

1

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?

+1  A: 

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>
John Hartsock
Some CSS clear would be good too. And where is the checkbox?
Cybrix
@Cybrix. I was just trying to get him started not give him the answer. "Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime."....but because of your comment I decided to finish it out. Its obviously not perfect but its pretty close. as for your previous answer that was posted. Proper semantics should be used in HTML (tables for tabular data). If you look his original table layout vs what I provided you can see it is much easier to read and in the end will be easier to manage.
John Hartsock
I could't agree more with your comment about the use of proper semantics. But I have no doubt that his actual page structure must be designed with HTML table and introducing him with DIV's layout might be a bit too "early". The actual question was "What am I doing wrong?" Not "Please feed me with codes I dont know about and I will find hard to modify". Anyway I think giving him a link so he can learn to design using CSS layouts would be a + for user457827
Cybrix
@Cybrix ... its funny you say "I could't agree more with your comment about the use of proper semantics." With that being said, the answer to the question "What am I doing wrong?" is Use proper semantics learn to use divs, spans, and begin using HTML as it was intended. As for finding my suggestion hard to modify and understand. I completely disagree. He obviously knows some CSS and just needs some direction on better ways to use CSS and HTML. Reading the code I suggested is much easier than reading and understanding that messy table structure for such a simple task.
John Hartsock