Jump to content


Photo

Textbox Giving Me Trouble


  • Please log in to reply
5 replies to this topic

#1 ChadGregory

ChadGregory

    Member

  • Members
  • PipPip
  • 15 posts

Posted 22 December 2012 - 03:30 AM

I am creating a responsive website and I am coming across a strange problem with my search text box. I want the text box to span the full width parent element. Here are the css rules applied to the text box.

#searchform input[type = text] {
  border: 0;
  padding: 8px 0;
  width: 100%;
  max-width: 640px;
  top: 0;
  margin:0;
position: relative;
}

I have the view port setup correctly and every else works fine, but there is white space on the right side of the text box. After tinkering with the css properties in Chrome to get live updates using Chrome Developer Tools I stumbled across a very strange partial solution. If i disable the width: 100%; property and re-enable it the white space disappears. I reload the page and its back again.

How can I fix this issue?

#2 Love2c0de

Love2c0de

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationThe Pleiades
  • Age:23

Posted 22 December 2012 - 07:57 PM

Can you post some more HTML and CSS or a link to a live version of the page?

Regards,

AoTB.

#3 ChadGregory

ChadGregory

    Member

  • Members
  • PipPip
  • 15 posts

Posted 23 December 2012 - 02:39 AM

<form role="search" method="get" id="searchform" action="http://papillonstudios.ca">
<div> <input type="text" value="" placeholder="Search..." name="s" id="s">
<input type="submit" id="searchsubmit" value="" width="26" height="28">
</div>
</form>

Live Link(WIndow Width must be 640px or less) - http://papillonstudios.ca

Edited by ChadGregory, 23 December 2012 - 02:40 AM.


#4 Love2c0de

Love2c0de

    Advanced Member

  • Members
  • PipPipPip
  • 361 posts
  • LocationThe Pleiades
  • Age:23

Posted 23 December 2012 - 03:31 AM

Just so I'm clear, is the problem with the text box not aligning correctly with your submit button?

If that is an issue, then change your top: 8px to top: 0px on your #searchform input[type="submit"] element.

That's the only issues I'm seeing at the moment.

Regards,

AoTB.

#5 ChadGregory

ChadGregory

    Member

  • Members
  • PipPip
  • 15 posts

Posted 23 December 2012 - 07:27 PM

I viewed it again today and it just fixed itself.

#6 wright67uk

wright67uk

    Advanced Member

  • Members
  • PipPipPip
  • 438 posts

Posted 31 December 2012 - 07:32 AM

I viewed it again today and it just fixed itself.


Could this be down to your cache being refreshed?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com