Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!-- First card -->
<div class="flexbox-centering">
  <div class="child">
    <div DefaultButton="btnPatientSearch">
      <div class="input-card" style="margin-top: 20px;">
        <div class="input-title">
          Hospital Number
        </div>
        <div class="row input-box">
          <input Class="form-control" runat="server" ID="txt_HospNumber" placeholder="Enter information" autocomplete="off"></input>
        </div>
        <input id="toggle" type="checkbox" style="display:none">
        <label class="label-search" for="toggle">Show more search options</label>
        <div id="expand">
          <section>
            <div class="row">
              <div class="col-md-4">
                <div class="input-expand-title">
                  NHS Number
                </div>
              </div>
              <div class="col-md-8">
                <input class="form-control" runat="server" ID="txtNHSNumber" placeholder="Enter information" autocomplete="off"></input>
              </div>
            </div>
            <div class="row">
              <div class="col-md-4">
                <div class="input-expand-title">
                  Forename
                </div>
              </div>
              <div class="col-md-8">
                <input class="form-control" ID="txt_Forename" runat="server" placeholder="Enter information" autocomplete="off"></input>
              </div>
            </div>
            <div class="row">
              <div class="col-md-4">
                <div class="input-expand-title">
                  Surname
                </div>
              </div>
              <div class="col-md-8">
                <input class="form-control" ID="txt_Surname" runat="server" placeholder="Enter information" autocomplete="off"></input>
              </div>
            </div>
            <div class="row">
              <div class="col-md-4">
                <div class="input-expand-title">
                  Date of Birth
                </div>
              </div>
              <div class="col-md-8">
                <input class="form-control" ID="txt_DOB" runat="server" placeholder="Enter information" autocomplete="off"></input>
              </div>
            </div>
          </section>
        </div>
        <button runat="server" Style="float: right; color: #fff;" Class="btn btn-primary" ValidationGroup="patientsearch" Text="Search" OnClick="DisplayLoading();">Search</button>
      </div>
    </div>
  </div>
</div>

<!-- Second card -->
<div class="flexbox-centering">
  <div class="child">
    <div class="input-card" style="margin-top: 20px;">
      <p>ASP.NET code</p>
      <textarea class="form-control" style="height:150px">
<div class="flexbox-centering">
<div class="child">
<asp:Panel runat="server" DefaultButton="btnPatientSearch">
<div class="input-card" style="margin-top: 20px;">
<div class="input-title">
Hospital Number
</div>
<script type="text/javascript">
</script>
<div class="row input-box">
<asp:TextBox CssClass="form-control" runat="server" ID="txt_HospNumber" placeholder="Enter information" autocomplete="off"></asp:TextBox>
</div>
<input id="toggle" type="checkbox">
<label class="label-search" for="toggle">Show more search options</label>
<div id="expand">
<section>
<div class="row">
<div class="col-md-4">
<div class="input-expand-title">
NHS Number
</div>
</div>
<div class="col-md-8">
<asp:TextBox CssClass="form-control" runat="server" ID="txtNHSNumber" placeholder="Enter information" autocomplete="off"></asp:TextBox>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="input-expand-title">
Forename
</div>
</div>
<div class="col-md-8">
<asp:TextBox CssClass="form-control" ID="txt_Forename" runat="server" placeholder="Enter information" autocomplete="off"></asp:TextBox>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="input-expand-title">
Surname
</div>
</div>
<div class="col-md-8">
<asp:TextBox CssClass="form-control" ID="txt_Surname" runat="server" placeholder="Enter information" autocomplete="off"></asp:TextBox>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="input-expand-title">
Date of Birth
</div>
</div>
<div class="col-md-8">
<asp:TextBox CssClass="form-control" ID="txt_DOB" runat="server" placeholder="Enter information" autocomplete="off"></asp:TextBox>
</div>
</div>
</section>
</div>
<asp:CompareValidator ID="CompareValidator1" runat="server" Display="Dynamic" Type="Date" Operator="DataTypeCheck" ControlToValidate="txt_DOB" ErrorMessage="*Please enter a valid date DD/MM/YYYY." ForeColor="Red"></asp:CompareValidator>
<ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txt_DOB" Format="dd/MM/yyyy"></ajaxToolkit:CalendarExtender>
<asp:Button runat="server" ID="btnPatientSearch" Style="float: right; color: #fff;" CssClass="btn btn-primary form-control" ValidationGroup="patientsearch" Text="Search" OnClientClick="DisplayLoading();" OnClick="btn_PatientSearch_click"></asp:Button>
<ajaxToolkit:AnimationExtender ID="AnimationExtender1" TargetControlID="btnPatientSearch" runat="server">
<Animations><OnClick><FadeOut Duration="0.1" Fps="20" minimumOpacity=".6" /></OnClick></Animations>
</ajaxToolkit:AnimationExtender>
<asp:CustomValidator ValidationGroup="patientsearch" Display="Dynamic" class="btn btn-danger btn-sm tooltip-error" ID="SearchforPatientValidator" runat="server" ErrorMessage="CustomValidator" OnServerValidate="CustomValidator_ServerValidate" ForeColor="white"></asp:CustomValidator>
</div>
<script type="text/javascript">
function DisplayLoading() {
document.getElementById('<%=btnPatientSearch.ClientID%>').value = 'Searching...';
}
</script>
</asp:Panel>
</div>
</div>
        </textarea>
      <button class="btn btn-link" style="float:right;">Copy Code</button>
    </div>
  </div>
</div>

<div id="watermark">
  Oliver Brennan
</div>
              
            
!

CSS

              
                body {
  background: #141e30 no-repeat center center fixed;
  background: -webkit-linear-gradient(to top, #2980b9, #2c3e50) no-repeat center
    center fixed;
  background: linear-gradient(to top, #2980b9, #2c3e50) no-repeat center center
    fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

#watermark {
  font-size: 1.2em;
  position: fixed;
  bottom: 0px;
  right: 7px;
  color: #fff;
  opacity: 0.1;
  pointer-events: none;
}

.flexbox-centering {
  display: flex;
  justify-content: center;
  align-items: center;
}
.child {
  padding: 15px;
}
.input-card {
  padding: 20px 30px 50px 30px;
  width: 450px;
  background: #fff;
  box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 15px;
  border: 1px solid #7f928c;
  border-radius: 8px;
}

.input-title {
  font-size: 1.1em;
  margin-left: -15px;
  font-weight: 700;
}

.input-box {
  margin-bottom: 15px;
}
#expand {
  height: 0px;
  overflow: hidden;
  transition: height 0.5s;
}

section {
  padding: 0 20px;
}

#toggle:checked ~ #expand {
  height: 160px;
}

#toggle:checked ~ label::before {
  content: "-";
}

.input-expand-title {
  line-height: 3;
  font-size: 0.9em;
  float: right;
  font-weight: bold;
}

.label-search {
  display: block;
  padding: 0.5em;
  border-bottom: 1px solid #ccc;
  color: #666;
}

.label-search:hover {
  color: #000;
}

.label-search::before {
  font-family: Consolas, monaco, monospace;
  font-weight: bold;
  font-size: 15px;
  content: "+";
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 3px;
  padding-left: 7px;
  background: radial-gradient(ellipse at center, #ccc 50%, transparent 50%);
}

              
            
!

JS

              
                $("button").click(function() {
  $("textarea").select();
  document.execCommand("copy");
});

              
            
!
999px

Console