2

On this page at the bottom in the form to add comments, I have a set of hidden HTML inputs. Works fine, except on IE.

In IE, they take space and move the form down. I suspect it is because there are generic CSS rules for input, but I'm not 100% sure. If that's the case, how do I make it so that input types "hidden" don't get affected by CSS rules? If that's not it, then what's going on?

1
  • Just came across this, what I would do is use jQuery to add a class to input[type=hidden] and then set .hidden (assuming that's the class name) to display: none;. It should work but I haven't tested it. Commented Jul 23, 2012 at 7:57

4 Answers 4

1

Use IE Developer Tools( F12 ) to find out which object is really taking space.

Sign up to request clarification or add additional context in comments.

1 Comment

I used debugbar and it all points to the hidden input. I may be mistaken.
1

Add a float: left;. It'll help.

1 Comment

How will it help? Answers should have an explanation
0

For IE add conditional tags to handle #content and .comment-sbt-btn

Do this:

  1. Remove width: 100% from #content
  2. Clear left the and remove margin-left on .comment-sbt-btn:
 clear: left; margin-left: inherit; 

This will fix the rendering problem in IE.

Comments

0

I found this worked for me with a hidden submit button in IE

<input type="submit" style="width:0; height:0; border:0; background-color:inherit; overflow:hidden;" /> 

Maybe it'll work for other types of hidden controls

2 Comments

Is there a way to do it globally via a CSS rules? Without writing a class name or modifying all the html across the site?
I'm sure you could either put a class on all the hidden inputs or apply the relevant CSS via jQuery

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.