SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: 2 column form

  1. #1
    SitePoint Zealot
    Join Date
    May 2007
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    2 column form

    Hello Folks,
    is it possible to have a 2 column forum using fieldset ???

    I tried

    Code:
     #leftColumn {
    left:0;
    width: 50%;
    }
    
     #rightColumn {
    left: 50%;
    width: 50%;
    }
    HTML Code:
     <form>
    <fieldset>
    <legend>This is my form</legend>
    <div id="leftColumn">
      <div id="elementWrap">
        <label class="fieldName">name</label>
        <input type="text" class="textField" />
      </div>
    </div>
    <div id="rightColumn">
      <div id="elementWrap">
        <label class="fieldName">email</label>
        <input type="text" class="textField" />
      </div>
    </div>
    </fieldset>
    </form>                 
    but it doesn't work. Any idea ???

    THANKS
    Alla prossima ...

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It won't work in Internet Explorer due to the way that IE styles fieldsets.

    Wrap each fieldset in a DIV, give that DIV a class of "fieldset" and then stick a SPAN inside your legends.

    http://www.tyssendesign.com.au/artic...gends-of-style has more information on how to do this.

    Then float the DIVs with the class of "fieldset" normally. You also need to give your inputs a unique ID and then add the for="" attribute to the associated label, putting the ID of the input inside the label's for="" attribute.

  3. #3
    SitePoint Zealot
    Join Date
    May 2007
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Dan, I use FireFox on Mac
    Alla prossima ...

  4. #4
    SitePoint Wizard bronze trophy DaveWoods's Avatar
    Join Date
    Dec 2004
    Location
    Derbyshire - UK
    Posts
    2,651
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by macsig View Post
    Thanks Dan, I use FireFox on Mac
    It doesn't matter what you use; you need to think about what users of your site will be using which I suggest means supporting IE6, IE7, Firefox, Safari and Opera as a minimum.

  5. #5
    SitePoint Wizard bronze trophy DaveWoods's Avatar
    Join Date
    Dec 2004
    Location
    Derbyshire - UK
    Posts
    2,651
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, the "left" value is only used with absolute or relative positioning. You'll need to use float: left; to get any element to sit next to each other (display: inline; also works but width, height etc cannot be applied).

  6. #6
    SitePoint Zealot
    Join Date
    May 2007
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm sorry I have not specified that I'm working on web application (not a web site) and all the users will use WebRunner to use the application.

    So I don't have any IE, Opera compatibility issue.

    Thnak you CSSWIZ for your comments.
    Alla prossima ...

  7. #7
    SitePoint Wizard bronze trophy DaveWoods's Avatar
    Join Date
    Dec 2004
    Location
    Derbyshire - UK
    Posts
    2,651
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, in that case ignore my comments about the browsers, it never ceases to amaze me how many people state that they use a specific browser, specific resolution with all the plugins and expect everyone else to see the same so sorry for assuming you fell into this category

    The other comments about the left value still apply though


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •