Why is there a default margin separating the input from the text?

Why aren’t they stuck together?

How would I get rid of that empty space?
So I can set my own margin.

I cannot figure this out at all.

.table {
  display: table;
}

.info {
  display: table-cell;
  white-space: nowrap;
}

    <div class="table">
      <div class="info">

        <input id="input" type="text" name="someNameHere" placeholder="someValueHere" />
        <input id="sent" type="submit" value="Set" />

      </div>
    </div>

The margin between your input and text is the one You set on your …

p.my-content {
display: table;
margin: 22px auto 0;

2 Likes

They are “inline-block” elements. :winky:

Three possible HTML solutions:-

<input  type="text"><input  type="submit" value="Set">    
<input type="text"
/><input type="submit" value="Set">  
<input  type="text"><!--
--><input type="submit" value="Set">

coothead

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.