- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hello, i have a little confusion regarding structure of this form..(http://i.imgur.com/cvdFIzk.png). should i divide this form like i did in this pic? My main problem coming in last block.. a div encloses button and that text.. is that semantically right? one more problem here. (http://i.imgur.com/WX3w741.png) . In this 2nd pic, you can see a google map(i will use image at the moment). In this belongs to this form.. or i just need to adjust form according to it..thanks
You can structure the internals of a form pretty much any way you want. Some people use tables, some divs…some even use definitions lists
Over on HTMl5Doctor they have a form ‘snippet’ like this:
<form id="app-login" action="process.php">
<fieldset>
<legend>Login Details</legend>
<div>
<label for="user-name">Username:</label>
<input name="user-name" type="email" placeholder="Your username is your email address" required autofocus>
</div>
<div>
<label for="password">Password:</label>
<input name="password" type="password" placeholder="6 digits, a combination of numbers and letters" required>
</div>
<div>
<input name="login" type="submit" value="Login">
</div>
</fieldset>
</form>
Divs have no semantic meaning in and of themselves…so can use them however you wish.
So divs are fine…and it would be my preferred option.
As for the map….I would include it in the form ‘area’ because it’s simpler to arrange all the elements.
I realise that it’s not really a form element as such but so what?
thanks for the reply. :)