Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

size attribute to input box isn't responsive #378

Open
ghost opened this issue Oct 21, 2018 · 1 comment
Open

size attribute to input box isn't responsive #378

ghost opened this issue Oct 21, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 21, 2018

Hey!

If you add a size attribute to an input element, it isn't responsive and I don't exactly know how you could make it responsive. I'm not sure if it'd be possible to add a class that would make it responsive, but yeah.

@toxicmender
Copy link

toxicmender commented Dec 12, 2018

You should check here for examples
screenshot_2018-12-12 skeleton responsive css boilerplate

This makes a responsive <div> which contains your input element. Although I'm not sure if creating a CSS class for the input would work but this way you can contain the input in a responsive <div>, creating the same effect.

<!-- The above form looks like this -->
<form>
  <div class="row">
    <div class="six columns">
      <label for="exampleEmailInput">Your email</label>
      <input class="u-full-width" type="email" placeholder="[email protected]" id="exampleEmailInput">
    </div>
    <div class="six columns">
      <label for="exampleRecipientInput">Reason for contacting</label>
      <select class="u-full-width" id="exampleRecipientInput">
        <option value="Option 1">Questions</option>
        <option value="Option 2">Admiration</option>
        <option value="Option 3">Can I get your number?</option>
      </select>
    </div>
  </div>
  <label for="exampleMessage">Message</label>
  <textarea class="u-full-width" placeholder="Hi Dave …" id="exampleMessage"></textarea>
  <label class="example-send-yourself-copy">
    <input type="checkbox">
    <span class="label-body">Send a copy to yourself</span>
  </label>
  <input class="button-primary" type="submit" value="Submit">
</form>

<!-- Always wrap checkbox and radio inputs in a label and use a <span class="label-body"> inside of it -->

<!-- Note: The class .u-full-width is just a utility class shorthand for width: 100% -->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant