Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1177974

    carljasper
    Participant

    Hi, how can I create a legend like this? I used this html tags and it is not working

    ” <fieldset>
    <legend>Personalia:</legend>
    Name: <input type=”text”><br>
    Email: <input type=”text”><br>
    Date of birth: <input type=”text”>
    </fieldset>

    #1178228

    Joao
    Moderator

    Hi There,

    Hi Did you wrap your code in a form tag?

    Please follow this example:

    <form>
    <fieldset>
    <legend>Personalia:</legend>
    Name: <input type=”text” size=”30″><br>
    Email: <input type=”text” size=”30″><br>
    Date of birth: <input type=”text” size=”10″>
    </fieldset>
    </form>

    Let us know how it goes,

    Joao

    #1182668

    carljasper
    Participant

    It is not still working… it is still the same.

    #1182750

    Friech
    Moderator

    Hi There,

    It is working, are you referring to the border around that fieldset? If so, you can add this under Custom > CSS in the Customizer.

    body fieldset {
        display: block;
        -webkit-margin-start: 2px;
        -webkit-margin-end: 2px;
        -webkit-padding-before: 0.35em;
        -webkit-padding-start: 0.75em;
        -webkit-padding-end: 0.75em;
        -webkit-padding-after: 0.625em;
        min-width: -webkit-min-content;
        border-width: 2px;
        border-style: groove;
        border-color: threedface;
        border-image: initial;
    }
    
    body fieldset legend {
        display: block;
        -webkit-padding-start: 2px;
        -webkit-padding-end: 2px;
        border-width: initial;
        border-style: none;
        border-color: initial;
        border-image: initial;
        width: auto;
    }

    Hope it helps, Cheers!

    #1182802

    carljasper
    Participant

    Works like a charm, thank you

    #1182839

    Christian
    Moderator

    You’re welcome. Glad we could help 🙂