htmlcssformsfieldset

My fieldset isn't separated from the other fieldset


I need to separate a few sections of a survey I'm working on, but the fieldset isn't showing up at all (like no borders or any paragraphs shown). The second fieldset appears as a part of the first one and the

How much do you like eggs does not appear. Please help

This is my code (I removed some labels and inputs to make it easier to read):

    <fieldset>
      <p>How do you like your eggs cooked?</p>
      <select id="dropdown">
        <option value="scrambled">Scrambled</option>
        <option value="bullseye">Bull's Eye</option>
        <option value="boiled">Boiled</option>
    </fieldset>
    <fieldset> 
      <p>How much do you like eggs?</p>
        <label for="verymuch" name="label-radio"><input type="radio" id="verymuch" value="verymuch" name="radios" checked>Very much </label>
     </fieldset>

I tried changing up the code both in html and css, like playing around with margins and display ect.., but it still did not change at all. I just want to make the border of the fieldset appear and separate the radio inputs with the dropdown


Solution

  • try this code

    <fieldset>
          <p>How do you like your eggs cooked?</p>
          <select id="dropdown">
            <option value="scrambled">Scrambled</option>
            <option value="bullseye">Bull's Eye</option>
            <option value="boiled">Boiled</option>
          </select>
         </fieldset>
         <fieldset>
          How much do you like eggs?
            <input type="radio" id="verymuch" value="verymuch" name="radios" checked="">Very much 
         </fieldset>
    

    you didnt close your select tag!