Which CSS tag creates a box like this with title?

后端 未结 7 814
日久生厌
日久生厌 2020-12-29 01:20

I want to create a box like this with title:

\"CSS

Can any one please let me know if t

相关标签:
7条回答
  • 2020-12-29 02:07

    If you are not using it in forms, and instead want to use it in an non-editable form, you can do this via the following code -

    .title_box {
      border: #3c5a86 1px dotted;
    }
    
    .title_box #title {
      position: relative;
      top: -0.5em;
      margin-left: 1em;
      display: inline;
      background-color: white;
    }
    
    .title_box #content {}
    <div class="title_box" id="bill_to">
      <div id="title">Bill To</div>
      <div id="content">
        Stuff goes here.<br> For example, a bill-to address
      </div>
    </div>

    0 讨论(0)
提交回复
热议问题