HTML5: How to move input boxes!

2 replies
  • WEB DESIGN
  • |
Hello Everyone,

I am new to html5. I am trying to move the three input boxes below( i.e for room length, room width and room height) to the left so that they are closer to the three prompts.

I have tried many ideas but no success. It is getting a little frustrating.
Please help.
Thanks!

<!DOCTYPE html>
<!-- Author:
Date:
File: kingPainting.html
Purpose: Chapter 4 Exercise
-->

<html>
<head>
<title> King Painting</title>
<link rel="stylesheet" type="text/css" href="chapter4.css" />
<style>
h1 { color:red;}
</style>
</head>
<body>
<h1> King Painting</h1>
<p> Use this form to obtain a quick estimate of the cost to paint a room</p>
<form action="paintEstimate.php" method="post">
<table>
<tr>
<td> Room length in feet:</td>
<td><input type="text" size ="5" name="roomLength"/></td></tr>
<tr>
<td>Room width in feet:</td>
<td><input type="text" size="5" name="roomWidth"/></td></<tr>
<tr><td>Room Height in feet:</td>
<td><input type="text" size="5" name="roomHeight"/></td>
</tr>
<td><input type=submit value="Display Estimated Painting Cost"/></td>
</table>
</form>
</body>
</html>
#boxes #html5 #input #move
  • Profile picture of the author Patrick
    First, this is not HTML5, this is how pages were coded in 1995.

    Don't use tables, use Divs.
    {{ DiscussionBoard.errors[10868428].message }}
  • Profile picture of the author dburk
    Hi Marceljaff,

    What Peter said... don't use tables. that horrible practice went out of style 15 years ago.

    Design Best Practices call for separating content from presentation. Don't try to control the layout of your forms using HTML, that is properly done by apply styles, typically using a separate CSS stylesheet file.

    You may also want to consider using a CSS front-end framework like Twitter's Bootstrap , or Foundation. These frameworks have done a lot of the work for you and have built-in grid systems for layout, making your web pages mobile friendly "Responsive" designs and can significantly shorten the time it takes you to develop a project.
    {{ DiscussionBoard.errors[10868478].message }}

Trending Topics