Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make text label regular font (not bold) in Bootstrap?

I'm building a form using Bootstrap. Some of the fields are read only so the value is displayed a text (not an input field).

I want the label on the left to be bold and the value on the right to be regular (not bold).

Here's the code and a screenshot ... what is the correct way to have the value on the right display as regular font (not bold)?

screenshot of web page

  <form id="saveEntityDefForm" class="form-horizontal">


    <div>
        <div class="form-group">
            <label class="control-label col-sm-2" for="inputAppID">App Name</label>
            <div class="col-sm-10">
                <label class="control-label">Stephen's Library</label>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-sm-2" for="inputTableName">DB Connection</label>
            <div class="col-sm-10">
                <label class="control-label">Stephen's Library DB Connection</label>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-sm-2" for="inputTableName">DB Table Name</label>
            <div class="col-sm-10">
                <label class="control-label"><%=entityDefDTO.getTableName()%></label>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-sm-2" for="inputEntityName">Entity Name</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="inputEntityName" placeholder="ex. Book">
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-sm-2" for="inputEntityName">Entity Name Plural</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="inputEntityName" placeholder="ex. Books">
            </div>
        </div>
</div>

1 Answers

use:

font-weight-bold

like:

App Name Stephen's Library

    <div class="form-group">
        <label class="control-label col-sm-2 font-weight-bold" for="inputTableName">DB Connection</label>
        <div class="col-sm-10">
            <label class="control-label">Stephen's Library DB Connection</label>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-sm-2  font-weight-bold" for="inputTableName">DB Table Name</label>
        <div class="col-sm-10">
            <label class="control-label"><%=entityDefDTO.getTableName()%></label>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-sm-2  font-weight-bold" for="inputEntityName">Entity Name</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="inputEntityName" placeholder="ex. Book">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-sm-2  font-weight-bold" for="inputEntityName">Entity Name Plural</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="inputEntityName" placeholder="ex. Books">
        </div>
    </div>
</div>
like image 178
nikhil sugandh Avatar answered Oct 27 '25 05:10

nikhil sugandh