Samuel Denty Samuel Denty - 1 year ago 119
CSS Question

Form not staying next to buttons

I'm designing a footer on a HTML webpage with a radio-selection form on it. I have some buttons inside the footers div, centered using

. Without the form on it, it works 100%. I can't get the form to display next to the other buttons, without using
float: right;
in the stylesheet. When I use float, it is inconsistently dynamic with the rest of the buttons in the div. I've tried setting fixed heights, but I want it to be dynamic. So how can I get the form to display next the the links, in the same way that the links display next to each other?




Answer Source

You could put both groups of elements inside their own <div> and float them both to the left.

<div style="float:left;">
    <a id="BtnStyle" href="">10&nbsp;Views</a>
    <a id="BtnStyle" href="">About</a>
    <a id="BtnStyle" href="">SD-Storage</a>
<div style="float:left">
    <form action="#" width="200px" class="ThemeSelector">
        <input name="group1" type="radio" id="test1" class="red" />
        <label for="test1">Test 1</label>
        <input name="group1" type="radio" id="test2" class="red" />
        <label for="test2">Test 2</label>

Here's an example

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download