John Higgins John Higgins - 4 months ago 11
HTML Question

CSS to force inline input fields

I have the following code and I am unable to access the HTML to edit.

<form>
<div class="LoginDiv">
<input type="text" name="user_login" tabindex="1" placeholder="Email"/>
</div>
<div class="LoginDiv">
<input type="password" name="user_password" tabindex="2" placeholder="Password" />
</div>
<button type="submit">LOGIN</button>
</form>


This displays as per the image.

enter image description here

I am able to access the CSS and I would like to be able to force the input fields so they are inline.

Is this possible?

Thanks,

John

Answer

Here's what you need I guess

.LoginDiv {
  display: inline-block;
 }

https://jsfiddle.net/21o0uL52/