Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide div on input focus

Status
Not open for further replies.

tyutghf

Technical User
Apr 12, 2008
258
0
0
GB
Hi

I have a simple form that is being displayed in kiosk mode using a tablet. When the user clicks to enter data to the input field, the keyboard takes up the bottom 1/3 of the screen and hides the other items they need to click.

To solve this, I could remove the header when they click in the input field, this will move the inout field to the top and expose the other field they need to click.

Can I do this with css?

HTML:
<header>
This is the element to remove on input click
</header>
<h1>Also remove this on input click</h1>
<div class='content'>
<form>
<input type='text' name='fullname' id='fullname' /> On clicking this, the header and h1 are hidden above, effectively moving this input field to the top of the screen.
</form>
<p>Other info that is currently hidden by the keyboard.</p>
</div>

Thanks
 
Thanks, looks like I'll have to find a jquery solution to make the input scroll to the top of the page which may actually be a better solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top