Generally speaking CSS should always be externally linked unless there is an extremely good reason not to do so or you want a “single” localised; quick and dirty lazy fix on a specific item.
To see how the CSS applies itself try it out… it will of course style any form in the exact same way that it comes across that matches those patterns. It will do it on any page; each and every time there is a corresponding “match” linked to assuming the file is external: http://www.w3.org/TR/CSS2/selector.html#pattern-matching Notice a few Descendant selectors were used.
That is where your classes may come into play if you just want to match one single form or you could use multiple style sheets.
I have learned it , but i can’t remember how to move the username and password to their perspective field boxes , i will work it out today , and when i get the ansere , i will give you the answer .
I suspect the closing </style> was a redundant typo during the testing period and got copy-and-pasted by accident the CSS should be external.
You cannot use “form1” in that context the form (in the example) matched the FORM element perhaps you are getting confused with matching ‘class’ selectors and ‘id’ values.
That form (post #7) matches <form> not; class=“form” so it could only be legally named ‘form’ in that instance. However, you could probably create a CLASS or ID attribute within the HTML called ‘form1’ and rewrite the CSS, so it matched a class, etc.
Your form was bit of a mess Like johnny.dacu already mentioned you used a lot of those entities (none-breaking spaces), Than there were 2 opening <span> tags without closing </span> tags, there was a closing </a> tag in the middle of the form, you had both size and width properties for your texfields declared and then all those font declaraties, those should be in a stylesheet.
I cleaned it a bit up:
html, body, form, label, div, input {
margin: 0; padding: 0;
}
form {
width: 500px;
}
form div {
width: 100%;
}
form label {
float: left; font-weight: bold; font-size: /* whatever ont size you wish to use */
}
form input {
width: 100px; margin: 2px 8px; float: left; display: inline;
}
</style>
First, remove all code. Not very useful. To arrange labels use CSS. Add a display block prop, same for input and then play with dimension (width, text-align and padding);