CSS forms z-index hell

Reply

Join Date: Feb 2008
Posts: 1
Reputation: bpeikes is an unknown quantity at this point 
Solved Threads: 0
bpeikes bpeikes is offline Offline
Newbie Poster

CSS forms z-index hell

 
0
  #1
Feb 9th, 2008
OK, I'm fairly new to the world of CSS and am basically ready to give up. I've tried to look for good books on CSS design, but they mostly just talk about the specifics. Not many "cookbooks" out there as far as I can tell.

Now the problem:
I've got a form in which I've created styles for each piece. Example, I've got a "item-field" style which I apply to a div which wraps an entire entry, a "item-label" which is the label for a field and "item-data" which is the input. All are divs, so a snippet of the code whould look like this:
  1. <div style="new-user-form" >
  2. <div style="item-field">
  3. <div style="item-label">Name</div>
  4. <div style="item-data"><input type="text" name="name" /></div>
  5. </div>
  6. <div style="item-field">
  7. <div style="item-label">Catgegory</div>
  8. <div style="item-data"><input type="text" name="category" /></div>
  9. </div>
  10. <div style="item-field">
  11. <div style="item-label">Age</div>
  12. <div style="item-data"><input type="text" name="age" /></div>
  13. </div>
  14. </div>
etc....
I've got some code which makes the category field an autocomplete dropdown of sorts. The problem is that the only way that I could get it to work is to make each item-field have decreasing z-index otherwise the "dropdown" in the item-field for category won't go in front of the Age textbox.
The problem is that if all of the "item-field" divs are on the same z-index, then their children can't display in front of the other boxes. THe problem is that if I make each "item-field" at decreasing z-index, the containing div, "new-user-form" wont expand as I add fields. I have a dynamic number of "item-field" objects.

I wish there was someway to have relative positioning for everything other than z-index, and then absolute z-indexing. How do people create well behaved sites with little pop-up messages, etc. It seems that you can't have a child draw in front of it's parents, only in front of siblings which have a lower z-index.

Any ideas? Books? Thanks everyone.
Last edited by bpeikes; Feb 9th, 2008 at 2:36 am.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 1,429
Reputation: Nichito is an unknown quantity at this point 
Solved Threads: 29
Featured Poster
Nichito's Avatar
Nichito Nichito is offline Offline
Nearly a Posting Virtuoso

Re: CSS forms z-index hell

 
0
  #2
Feb 9th, 2008
you should try this... it is a very good book... i myself learned web designed with it...
-->sometimes i wanna take my toaster in a bath<--
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 8
Reputation: enque is an unknown quantity at this point 
Solved Threads: 2
enque's Avatar
enque enque is offline Offline
Newbie Poster

Re: CSS forms z-index hell

 
0
  #3
Feb 14th, 2008
have you tried at "decreasing z-index" and setting the overflow to visible. is there somewhere online I can view this in action
Website Design with a difference.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC