IntelliJ Java IDE
The moose likes HTML, CSS and JavaScript and the fly likes HTML hidden fields takes white space in IE6 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "HTML hidden fields takes white space in IE6" Watch "HTML hidden fields takes white space in IE6" New topic
Author

HTML hidden fields takes white space in IE6

Paranidharan Selvaraj
Greenhorn

Joined: Mar 19, 2010
Posts: 17
I am iterating a list and setting a property in the hidden field. List is iterated and displayed in viewable mode.. When i click on edit all the list items are shown editable... at this time i m getting an extra space because of hidden.. could you suggest a solution for this.
Anoop Pillai
Greenhorn

Joined: Oct 05, 2008
Posts: 9
You can apply a style="display:none;" to the hidden field. By doing this it won't take up the extra space.
Ex: <input type="hidden" value="text" name="hid1" id="hid1" style="display:none;">


The Next Best Thing To Knowing Something Is Knowing Where To Find It.
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50691

No. Hidden fields take up no space. You are probably putting extra markup that's accounting for the extra space.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50691

Anoop Pillai wrote:You can apply a style="display:none;" to the hidden field.

Completely unnecessary.
Lisa Bowman
Greenhorn

Joined: Sep 21, 2010
Posts: 2
I too am having problems with this. If someone could help, I would be most appreciative:

Here is a snippet of my code:



hiddenField is kept in a separate css file:



This is still not working for me. Any suggestions/help would be greatly appreciated.

Thanks,

Lisa
Lisa Bowman
Greenhorn

Joined: Sep 21, 2010
Posts: 2
The individual who said that it was probably a mark-up issue was correct. I was not encapsulating the hidden fields in a <td></td> tag in my page. They were just hanging out in space. Thanks for the inadvertent help.
 
 
subject: HTML hidden fields takes white space in IE6
 
Threads others viewed
Dynamically moving the DIV
set bean value with onlick event
Jsp code in javascript function
How we can Count the no.of words in a given String
how to find hidden files in java?
developer file tools