Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9316709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:41:29+00:00 2026-06-19T02:41:29+00:00

Fiddle I want to move the input elements down in relation to their labels

  • 0

Fiddle

I want to move the input elements down in relation to their labels (only about 3 pixels). The main problem I am having is that making the inputs display: block; breaks the whole layout. I need the code text to appear right under the label and input that it is associated with, as it does now.

HTML:

<label for="inputSize"><p>Size</p><input id="inputSize" class="char2" type="text"><br><code>font-size: 17px;</code></label>
<label for="inputWeight"><p>Weight</p><input id="inputWeight" class="char3" type="text"><br><code>font-weight: 400;</code></label>
<label for="inputSpacing"><p>Letter-spacing</p><input id="inputSpacing" class="char2" type="text"><br><code>letter-spacing: 0;</code></label>
<label for="inputWSpacing"><p>Word-spacing</p><input id="inputWSpacing" class="char2" type="text"><br><code>word-spacing: 0;</code></label> 

CSS:

label {
    white-space: nowrap;
    display: inline-block;
}
label p {
    background: aqua;
    display: inline-block;
    color: @gray1;
    padding: 1px 10px;
    font-size: 16px;
    line-height: 24px;
}
input {
    font-family: monospace;
    height: 14px;
    box-shadow: 0px 0px 7px 0px #b8b8b8;
    border: 0;
}

Thanks!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T02:41:31+00:00Added an answer on June 19, 2026 at 2:41 am

    With position: relative you can move an element around relative to where it is supposed to be (in your case with top: 3px.

    http://jsfiddle.net/ExplosionPIlls/3YUTM/1/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following HTML: My Fiddle I want the <p> elements and their
I have created this Fiddle with this code: This is my problem I want
I have example (js-fiddle) I want hide all tbody elements, that doesn't contains elements
http://jsfiddle.net/MEKRM/ This is my fiddle I want to show / hide elements when i
see fiddle I want to drag the mouse on cell and whatever is under
Please see this fiddle I want the scrolling div stop following when left div
Here is the fiddle: fiddle Basically I want to include and accordion menu using
look at this fiddle: http://jsfiddle.net/ugxNK/ I want that the first list element is in
I have this fiddle : http://jsfiddle.net/XjeCf/1/ that works like I want and this one
Ok, I have this fiddle http://jsfiddle.net/25J3M/6/ , I want to position the red and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.