Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

CSS forms

  • 12-03-2008 05:48PM
    #1
    Moderators, Computer Games Moderators Posts: 10,462 Mod ✭✭✭✭


    Im trying to create a form online but some of the fields and the way i want to lay them out is a bit more complicated than just the standard name: textfield kind of layout. Anyone got any good tools that help with creating css forms? Ive looked at a few sites aswell but they tend to just show a very basic contact form.

    I need to put multiple textboxes side by side to fill in values etc. I want to try avoid using tables if possible for the form.

    I need something along the lines of

    text text text text text
    [field][field][field][field][field]
    [field][field][field][field][field]


Comments

  • Closed Accounts Posts: 1,200 ✭✭✭louie


    use a div container to hold other divs with float:left; and a fixed width:150px
    the container has to have clear:both style
    <div style='clear:both;width:600px'>
    <div style='width:150px; text-align:left;float:left;'>Text</div>
    <div style='width:150px; text-align:left;float:left;'>Text</div>
    <div style='width:150px; text-align:left;float:left;'>Text</div>
    <div style='width:150px; text-align:left;float:left;'>Text</div>
    </div>
    <div style='clear:both;width:600px'>
    <div style='width:150px; text-align:left;float:left;'>input box</div>
    <div style='width:150px; text-align:left;float:left;'>input box</div>
    <div style='width:150px; text-align:left;float:left;'>input box</div>
    <div style='width:150px; text-align:left;float:left;'>input box</div>
    </div>
    
    but I still think you are better off using table.


  • Moderators, Computer Games Moderators Posts: 10,462 Mod ✭✭✭✭Axwell


    Thanks Louie, i think i might just use tables for it cos theres a few awkward parts in it and i have a lot of forms on the site as they are for quotations so it might be the best option in the long run.

    Cheers


Advertisement