0

I have that code:

<form class="choose-game" action="?" method="get">
    <fieldset>
        <select name="game" id="game" required>
            <option value="battlefield 4">Battlefield 4</option>
            <option value="call of duty ghosts">Call Of Duty: Ghosts</option>
            <option value="fifa 2014">FIFA 2014</option>
            <option value="league of legends">League of Legends</option>
            <option value="need for speed rivals">Need For Speed: Rivals</option>
        </select>
        <input type="submit" value="Wybierz">
    </fieldset>
</form>

JSFiddle, but I want to input fill the remaining space in fieldset (except interstice). Any other one solution from StackOverflow doesn't work. What I must to do?

Albert221
  • 5,223
  • 5
  • 25
  • 41

1 Answers1

0

If you are okay with setting the width of the select box to a percentage you can then have the input fill the remaining width. You will also have to float the input and select to the left.

Try modifying the .choose-game select and input properties like this

.choose-game select { width:20%; float:left }

.choose-game input[type="submit"] { 
    background-color: #3498db; color: #fff; cursor:   pointer; width:80%; float:left;
}
katzkode
  • 1,911
  • 1
  • 13
  • 18