HTML bootstrap dl-horizontal not working as expected










1















Though i have div class "dl-horizontal" inside the table, the dl-horizontal fields appear to be outside the table
Code which i used:






<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<table class="table table-condensed table-striped">
<caption>Event <span class="badge">2</span></caption>
<dl class="dl-horizontal">
<dt>field-1</dt><dd>14</dd>
<dt>field-2</dt><dd>13</dd>
<dt>field-3</dt><dd>12</dd>
</dl>
<tr>
<th>Date</th>
<th>Field5</th>
<th>Field6</th>
<th>Field7</th>
<th>Field8</th>
<th>Field9</th>
</tr>
<tr>
<td class="text-nowrap">2018-11-13</td>
<td>val2</td>
<td>val2</td>
<td>val4</td>
<td>16</td>
<td>val5</td>
</tr>
</table>

</body>
</html>





What am i missing in this? I am trying to get "dl-horizontal" fields inside EVENT and above table values. any help is greatly appreciated. i tried table inside a the table but that doesnt seem to work.










share|improve this question






















  • <dl> tag is not a valid <table> tag, the only way to include it in table is to create a separate table row and data row in the table, for example: <table><tr><td colspan="6"><dl><dt></dt><dd></dd></dl></td></tr></table>

    – Michał Dąbrowski
    Nov 13 '18 at 23:39















1















Though i have div class "dl-horizontal" inside the table, the dl-horizontal fields appear to be outside the table
Code which i used:






<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<table class="table table-condensed table-striped">
<caption>Event <span class="badge">2</span></caption>
<dl class="dl-horizontal">
<dt>field-1</dt><dd>14</dd>
<dt>field-2</dt><dd>13</dd>
<dt>field-3</dt><dd>12</dd>
</dl>
<tr>
<th>Date</th>
<th>Field5</th>
<th>Field6</th>
<th>Field7</th>
<th>Field8</th>
<th>Field9</th>
</tr>
<tr>
<td class="text-nowrap">2018-11-13</td>
<td>val2</td>
<td>val2</td>
<td>val4</td>
<td>16</td>
<td>val5</td>
</tr>
</table>

</body>
</html>





What am i missing in this? I am trying to get "dl-horizontal" fields inside EVENT and above table values. any help is greatly appreciated. i tried table inside a the table but that doesnt seem to work.










share|improve this question






















  • <dl> tag is not a valid <table> tag, the only way to include it in table is to create a separate table row and data row in the table, for example: <table><tr><td colspan="6"><dl><dt></dt><dd></dd></dl></td></tr></table>

    – Michał Dąbrowski
    Nov 13 '18 at 23:39













1












1








1








Though i have div class "dl-horizontal" inside the table, the dl-horizontal fields appear to be outside the table
Code which i used:






<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<table class="table table-condensed table-striped">
<caption>Event <span class="badge">2</span></caption>
<dl class="dl-horizontal">
<dt>field-1</dt><dd>14</dd>
<dt>field-2</dt><dd>13</dd>
<dt>field-3</dt><dd>12</dd>
</dl>
<tr>
<th>Date</th>
<th>Field5</th>
<th>Field6</th>
<th>Field7</th>
<th>Field8</th>
<th>Field9</th>
</tr>
<tr>
<td class="text-nowrap">2018-11-13</td>
<td>val2</td>
<td>val2</td>
<td>val4</td>
<td>16</td>
<td>val5</td>
</tr>
</table>

</body>
</html>





What am i missing in this? I am trying to get "dl-horizontal" fields inside EVENT and above table values. any help is greatly appreciated. i tried table inside a the table but that doesnt seem to work.










share|improve this question














Though i have div class "dl-horizontal" inside the table, the dl-horizontal fields appear to be outside the table
Code which i used:






<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<table class="table table-condensed table-striped">
<caption>Event <span class="badge">2</span></caption>
<dl class="dl-horizontal">
<dt>field-1</dt><dd>14</dd>
<dt>field-2</dt><dd>13</dd>
<dt>field-3</dt><dd>12</dd>
</dl>
<tr>
<th>Date</th>
<th>Field5</th>
<th>Field6</th>
<th>Field7</th>
<th>Field8</th>
<th>Field9</th>
</tr>
<tr>
<td class="text-nowrap">2018-11-13</td>
<td>val2</td>
<td>val2</td>
<td>val4</td>
<td>16</td>
<td>val5</td>
</tr>
</table>

</body>
</html>





What am i missing in this? I am trying to get "dl-horizontal" fields inside EVENT and above table values. any help is greatly appreciated. i tried table inside a the table but that doesnt seem to work.






<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<table class="table table-condensed table-striped">
<caption>Event <span class="badge">2</span></caption>
<dl class="dl-horizontal">
<dt>field-1</dt><dd>14</dd>
<dt>field-2</dt><dd>13</dd>
<dt>field-3</dt><dd>12</dd>
</dl>
<tr>
<th>Date</th>
<th>Field5</th>
<th>Field6</th>
<th>Field7</th>
<th>Field8</th>
<th>Field9</th>
</tr>
<tr>
<td class="text-nowrap">2018-11-13</td>
<td>val2</td>
<td>val2</td>
<td>val4</td>
<td>16</td>
<td>val5</td>
</tr>
</table>

</body>
</html>





<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<table class="table table-condensed table-striped">
<caption>Event <span class="badge">2</span></caption>
<dl class="dl-horizontal">
<dt>field-1</dt><dd>14</dd>
<dt>field-2</dt><dd>13</dd>
<dt>field-3</dt><dd>12</dd>
</dl>
<tr>
<th>Date</th>
<th>Field5</th>
<th>Field6</th>
<th>Field7</th>
<th>Field8</th>
<th>Field9</th>
</tr>
<tr>
<td class="text-nowrap">2018-11-13</td>
<td>val2</td>
<td>val2</td>
<td>val4</td>
<td>16</td>
<td>val5</td>
</tr>
</table>

</body>
</html>






html css bootstrap-4






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 13 '18 at 23:23









user3357897user3357897

183




183












  • <dl> tag is not a valid <table> tag, the only way to include it in table is to create a separate table row and data row in the table, for example: <table><tr><td colspan="6"><dl><dt></dt><dd></dd></dl></td></tr></table>

    – Michał Dąbrowski
    Nov 13 '18 at 23:39

















  • <dl> tag is not a valid <table> tag, the only way to include it in table is to create a separate table row and data row in the table, for example: <table><tr><td colspan="6"><dl><dt></dt><dd></dd></dl></td></tr></table>

    – Michał Dąbrowski
    Nov 13 '18 at 23:39
















<dl> tag is not a valid <table> tag, the only way to include it in table is to create a separate table row and data row in the table, for example: <table><tr><td colspan="6"><dl><dt></dt><dd></dd></dl></td></tr></table>

– Michał Dąbrowski
Nov 13 '18 at 23:39





<dl> tag is not a valid <table> tag, the only way to include it in table is to create a separate table row and data row in the table, for example: <table><tr><td colspan="6"><dl><dt></dt><dd></dd></dl></td></tr></table>

– Michał Dąbrowski
Nov 13 '18 at 23:39












2 Answers
2






active

oldest

votes


















0














This it the correct approach:






<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<table class="table table-condensed table-striped">
<caption>Event <span class="badge">2</span></caption>
<tr><td colspan="6">
<dl class="dl-horizontal">
<dt>field-1</dt><dd>14</dd>
<dt>field-2</dt><dd>13</dd>
<dt>field-3</dt><dd>12</dd>
</dl>
</td></tr>
<tr>
<th>Date</th>
<th>Field5</th>
<th>Field6</th>
<th>Field7</th>
<th>Field8</th>
<th>Field9</th>
</tr>
<tr>
<td class="text-nowrap">2018-11-13</td>
<td>val2</td>
<td>val2</td>
<td>val4</td>
<td>16</td>
<td>val5</td>
</tr>
</table>

</body>
</html>








share|improve this answer
































    0














    I think that you need to place your description list with a table element for it to be included as part of the table. This snippet places it within the caption tag:






    <!DOCTYPE html>
    <html lang="en">

    <head>
    <title>Bootstrap Example</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    </head>

    <body>
    <table class="table table-condensed table-striped">
    <caption>Event <span class="badge">2</span>
    <dl class="dl-horizontal">
    <dt>field-1</dt>
    <dd>14</dd>
    <dt>field-2</dt>
    <dd>13</dd>
    <dt>field-3</dt>
    <dd>12</dd>
    </dl>
    </caption>
    <tr>
    <th>Date</th>
    <th>Field5</th>
    <th>Field6</th>
    <th>Field7</th>
    <th>Field8</th>
    <th>Field9</th>
    </tr>
    <tr>
    <td class="text-nowrap">2018-11-13</td>
    <td>val2</td>
    <td>val2</td>
    <td>val4</td>
    <td>16</td>
    <td>val5</td>
    </tr>
    </table>
    <hr>
    <table class="table table-condensed table-striped">
    <caption>Event <span class="badge">2</span>
    </caption>
    <tr>
    <td colspan="6">
    <dl class="dl-horizontal">
    <dt>field-1</dt>
    <dd>14</dd>
    <dt>field-2</dt>
    <dd>13</dd>
    <dt>field-3</dt>
    <dd>12</dd>
    </dl>

    </td>
    </tr>
    <tr>
    <th>Date</th>
    <th>Field5</th>
    <th>Field6</th>
    <th>Field7</th>
    <th>Field8</th>
    <th>Field9</th>
    </tr>
    <tr>
    <td class="text-nowrap">2018-11-13</td>
    <td>val2</td>
    <td>val2</td>
    <td>val4</td>
    <td>16</td>
    <td>val5</td>
    </tr>
    </table>

    </body>

    </html>








    share|improve this answer

























    • Thanks for the answer, but in this case, the description-list gets the caption properties(you can see a light gray for the description list). should i add seperate style properties for description list ?

      – user3357897
      Nov 13 '18 at 23:40











    • You will need to give it it's own styling. I've changed the snippet to show a seconds table where the list is placed with tr and td tags if you prefer that styling instead. But I'm guessing you'd want it something different.

      – MichaelvE
      Nov 13 '18 at 23:45











    • That should work for me. Thanks

      – user3357897
      Nov 13 '18 at 23:49










    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53290958%2fhtml-bootstrap-dl-horizontal-not-working-as-expected%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    This it the correct approach:






    <!DOCTYPE html>
    <html lang="en">
    <head>
    <title>Bootstrap Example</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    </head>
    <body>
    <table class="table table-condensed table-striped">
    <caption>Event <span class="badge">2</span></caption>
    <tr><td colspan="6">
    <dl class="dl-horizontal">
    <dt>field-1</dt><dd>14</dd>
    <dt>field-2</dt><dd>13</dd>
    <dt>field-3</dt><dd>12</dd>
    </dl>
    </td></tr>
    <tr>
    <th>Date</th>
    <th>Field5</th>
    <th>Field6</th>
    <th>Field7</th>
    <th>Field8</th>
    <th>Field9</th>
    </tr>
    <tr>
    <td class="text-nowrap">2018-11-13</td>
    <td>val2</td>
    <td>val2</td>
    <td>val4</td>
    <td>16</td>
    <td>val5</td>
    </tr>
    </table>

    </body>
    </html>








    share|improve this answer





























      0














      This it the correct approach:






      <!DOCTYPE html>
      <html lang="en">
      <head>
      <title>Bootstrap Example</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
      </head>
      <body>
      <table class="table table-condensed table-striped">
      <caption>Event <span class="badge">2</span></caption>
      <tr><td colspan="6">
      <dl class="dl-horizontal">
      <dt>field-1</dt><dd>14</dd>
      <dt>field-2</dt><dd>13</dd>
      <dt>field-3</dt><dd>12</dd>
      </dl>
      </td></tr>
      <tr>
      <th>Date</th>
      <th>Field5</th>
      <th>Field6</th>
      <th>Field7</th>
      <th>Field8</th>
      <th>Field9</th>
      </tr>
      <tr>
      <td class="text-nowrap">2018-11-13</td>
      <td>val2</td>
      <td>val2</td>
      <td>val4</td>
      <td>16</td>
      <td>val5</td>
      </tr>
      </table>

      </body>
      </html>








      share|improve this answer



























        0












        0








        0







        This it the correct approach:






        <!DOCTYPE html>
        <html lang="en">
        <head>
        <title>Bootstrap Example</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
        </head>
        <body>
        <table class="table table-condensed table-striped">
        <caption>Event <span class="badge">2</span></caption>
        <tr><td colspan="6">
        <dl class="dl-horizontal">
        <dt>field-1</dt><dd>14</dd>
        <dt>field-2</dt><dd>13</dd>
        <dt>field-3</dt><dd>12</dd>
        </dl>
        </td></tr>
        <tr>
        <th>Date</th>
        <th>Field5</th>
        <th>Field6</th>
        <th>Field7</th>
        <th>Field8</th>
        <th>Field9</th>
        </tr>
        <tr>
        <td class="text-nowrap">2018-11-13</td>
        <td>val2</td>
        <td>val2</td>
        <td>val4</td>
        <td>16</td>
        <td>val5</td>
        </tr>
        </table>

        </body>
        </html>








        share|improve this answer















        This it the correct approach:






        <!DOCTYPE html>
        <html lang="en">
        <head>
        <title>Bootstrap Example</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
        </head>
        <body>
        <table class="table table-condensed table-striped">
        <caption>Event <span class="badge">2</span></caption>
        <tr><td colspan="6">
        <dl class="dl-horizontal">
        <dt>field-1</dt><dd>14</dd>
        <dt>field-2</dt><dd>13</dd>
        <dt>field-3</dt><dd>12</dd>
        </dl>
        </td></tr>
        <tr>
        <th>Date</th>
        <th>Field5</th>
        <th>Field6</th>
        <th>Field7</th>
        <th>Field8</th>
        <th>Field9</th>
        </tr>
        <tr>
        <td class="text-nowrap">2018-11-13</td>
        <td>val2</td>
        <td>val2</td>
        <td>val4</td>
        <td>16</td>
        <td>val5</td>
        </tr>
        </table>

        </body>
        </html>








        <!DOCTYPE html>
        <html lang="en">
        <head>
        <title>Bootstrap Example</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
        </head>
        <body>
        <table class="table table-condensed table-striped">
        <caption>Event <span class="badge">2</span></caption>
        <tr><td colspan="6">
        <dl class="dl-horizontal">
        <dt>field-1</dt><dd>14</dd>
        <dt>field-2</dt><dd>13</dd>
        <dt>field-3</dt><dd>12</dd>
        </dl>
        </td></tr>
        <tr>
        <th>Date</th>
        <th>Field5</th>
        <th>Field6</th>
        <th>Field7</th>
        <th>Field8</th>
        <th>Field9</th>
        </tr>
        <tr>
        <td class="text-nowrap">2018-11-13</td>
        <td>val2</td>
        <td>val2</td>
        <td>val4</td>
        <td>16</td>
        <td>val5</td>
        </tr>
        </table>

        </body>
        </html>





        <!DOCTYPE html>
        <html lang="en">
        <head>
        <title>Bootstrap Example</title>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
        </head>
        <body>
        <table class="table table-condensed table-striped">
        <caption>Event <span class="badge">2</span></caption>
        <tr><td colspan="6">
        <dl class="dl-horizontal">
        <dt>field-1</dt><dd>14</dd>
        <dt>field-2</dt><dd>13</dd>
        <dt>field-3</dt><dd>12</dd>
        </dl>
        </td></tr>
        <tr>
        <th>Date</th>
        <th>Field5</th>
        <th>Field6</th>
        <th>Field7</th>
        <th>Field8</th>
        <th>Field9</th>
        </tr>
        <tr>
        <td class="text-nowrap">2018-11-13</td>
        <td>val2</td>
        <td>val2</td>
        <td>val4</td>
        <td>16</td>
        <td>val5</td>
        </tr>
        </table>

        </body>
        </html>






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 13 '18 at 23:50

























        answered Nov 13 '18 at 23:44









        Michał DąbrowskiMichał Dąbrowski

        865




        865























            0














            I think that you need to place your description list with a table element for it to be included as part of the table. This snippet places it within the caption tag:






            <!DOCTYPE html>
            <html lang="en">

            <head>
            <title>Bootstrap Example</title>
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
            <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
            <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
            </head>

            <body>
            <table class="table table-condensed table-striped">
            <caption>Event <span class="badge">2</span>
            <dl class="dl-horizontal">
            <dt>field-1</dt>
            <dd>14</dd>
            <dt>field-2</dt>
            <dd>13</dd>
            <dt>field-3</dt>
            <dd>12</dd>
            </dl>
            </caption>
            <tr>
            <th>Date</th>
            <th>Field5</th>
            <th>Field6</th>
            <th>Field7</th>
            <th>Field8</th>
            <th>Field9</th>
            </tr>
            <tr>
            <td class="text-nowrap">2018-11-13</td>
            <td>val2</td>
            <td>val2</td>
            <td>val4</td>
            <td>16</td>
            <td>val5</td>
            </tr>
            </table>
            <hr>
            <table class="table table-condensed table-striped">
            <caption>Event <span class="badge">2</span>
            </caption>
            <tr>
            <td colspan="6">
            <dl class="dl-horizontal">
            <dt>field-1</dt>
            <dd>14</dd>
            <dt>field-2</dt>
            <dd>13</dd>
            <dt>field-3</dt>
            <dd>12</dd>
            </dl>

            </td>
            </tr>
            <tr>
            <th>Date</th>
            <th>Field5</th>
            <th>Field6</th>
            <th>Field7</th>
            <th>Field8</th>
            <th>Field9</th>
            </tr>
            <tr>
            <td class="text-nowrap">2018-11-13</td>
            <td>val2</td>
            <td>val2</td>
            <td>val4</td>
            <td>16</td>
            <td>val5</td>
            </tr>
            </table>

            </body>

            </html>








            share|improve this answer

























            • Thanks for the answer, but in this case, the description-list gets the caption properties(you can see a light gray for the description list). should i add seperate style properties for description list ?

              – user3357897
              Nov 13 '18 at 23:40











            • You will need to give it it's own styling. I've changed the snippet to show a seconds table where the list is placed with tr and td tags if you prefer that styling instead. But I'm guessing you'd want it something different.

              – MichaelvE
              Nov 13 '18 at 23:45











            • That should work for me. Thanks

              – user3357897
              Nov 13 '18 at 23:49















            0














            I think that you need to place your description list with a table element for it to be included as part of the table. This snippet places it within the caption tag:






            <!DOCTYPE html>
            <html lang="en">

            <head>
            <title>Bootstrap Example</title>
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
            <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
            <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
            </head>

            <body>
            <table class="table table-condensed table-striped">
            <caption>Event <span class="badge">2</span>
            <dl class="dl-horizontal">
            <dt>field-1</dt>
            <dd>14</dd>
            <dt>field-2</dt>
            <dd>13</dd>
            <dt>field-3</dt>
            <dd>12</dd>
            </dl>
            </caption>
            <tr>
            <th>Date</th>
            <th>Field5</th>
            <th>Field6</th>
            <th>Field7</th>
            <th>Field8</th>
            <th>Field9</th>
            </tr>
            <tr>
            <td class="text-nowrap">2018-11-13</td>
            <td>val2</td>
            <td>val2</td>
            <td>val4</td>
            <td>16</td>
            <td>val5</td>
            </tr>
            </table>
            <hr>
            <table class="table table-condensed table-striped">
            <caption>Event <span class="badge">2</span>
            </caption>
            <tr>
            <td colspan="6">
            <dl class="dl-horizontal">
            <dt>field-1</dt>
            <dd>14</dd>
            <dt>field-2</dt>
            <dd>13</dd>
            <dt>field-3</dt>
            <dd>12</dd>
            </dl>

            </td>
            </tr>
            <tr>
            <th>Date</th>
            <th>Field5</th>
            <th>Field6</th>
            <th>Field7</th>
            <th>Field8</th>
            <th>Field9</th>
            </tr>
            <tr>
            <td class="text-nowrap">2018-11-13</td>
            <td>val2</td>
            <td>val2</td>
            <td>val4</td>
            <td>16</td>
            <td>val5</td>
            </tr>
            </table>

            </body>

            </html>








            share|improve this answer

























            • Thanks for the answer, but in this case, the description-list gets the caption properties(you can see a light gray for the description list). should i add seperate style properties for description list ?

              – user3357897
              Nov 13 '18 at 23:40











            • You will need to give it it's own styling. I've changed the snippet to show a seconds table where the list is placed with tr and td tags if you prefer that styling instead. But I'm guessing you'd want it something different.

              – MichaelvE
              Nov 13 '18 at 23:45











            • That should work for me. Thanks

              – user3357897
              Nov 13 '18 at 23:49













            0












            0








            0







            I think that you need to place your description list with a table element for it to be included as part of the table. This snippet places it within the caption tag:






            <!DOCTYPE html>
            <html lang="en">

            <head>
            <title>Bootstrap Example</title>
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
            <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
            <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
            </head>

            <body>
            <table class="table table-condensed table-striped">
            <caption>Event <span class="badge">2</span>
            <dl class="dl-horizontal">
            <dt>field-1</dt>
            <dd>14</dd>
            <dt>field-2</dt>
            <dd>13</dd>
            <dt>field-3</dt>
            <dd>12</dd>
            </dl>
            </caption>
            <tr>
            <th>Date</th>
            <th>Field5</th>
            <th>Field6</th>
            <th>Field7</th>
            <th>Field8</th>
            <th>Field9</th>
            </tr>
            <tr>
            <td class="text-nowrap">2018-11-13</td>
            <td>val2</td>
            <td>val2</td>
            <td>val4</td>
            <td>16</td>
            <td>val5</td>
            </tr>
            </table>
            <hr>
            <table class="table table-condensed table-striped">
            <caption>Event <span class="badge">2</span>
            </caption>
            <tr>
            <td colspan="6">
            <dl class="dl-horizontal">
            <dt>field-1</dt>
            <dd>14</dd>
            <dt>field-2</dt>
            <dd>13</dd>
            <dt>field-3</dt>
            <dd>12</dd>
            </dl>

            </td>
            </tr>
            <tr>
            <th>Date</th>
            <th>Field5</th>
            <th>Field6</th>
            <th>Field7</th>
            <th>Field8</th>
            <th>Field9</th>
            </tr>
            <tr>
            <td class="text-nowrap">2018-11-13</td>
            <td>val2</td>
            <td>val2</td>
            <td>val4</td>
            <td>16</td>
            <td>val5</td>
            </tr>
            </table>

            </body>

            </html>








            share|improve this answer















            I think that you need to place your description list with a table element for it to be included as part of the table. This snippet places it within the caption tag:






            <!DOCTYPE html>
            <html lang="en">

            <head>
            <title>Bootstrap Example</title>
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
            <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
            <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
            </head>

            <body>
            <table class="table table-condensed table-striped">
            <caption>Event <span class="badge">2</span>
            <dl class="dl-horizontal">
            <dt>field-1</dt>
            <dd>14</dd>
            <dt>field-2</dt>
            <dd>13</dd>
            <dt>field-3</dt>
            <dd>12</dd>
            </dl>
            </caption>
            <tr>
            <th>Date</th>
            <th>Field5</th>
            <th>Field6</th>
            <th>Field7</th>
            <th>Field8</th>
            <th>Field9</th>
            </tr>
            <tr>
            <td class="text-nowrap">2018-11-13</td>
            <td>val2</td>
            <td>val2</td>
            <td>val4</td>
            <td>16</td>
            <td>val5</td>
            </tr>
            </table>
            <hr>
            <table class="table table-condensed table-striped">
            <caption>Event <span class="badge">2</span>
            </caption>
            <tr>
            <td colspan="6">
            <dl class="dl-horizontal">
            <dt>field-1</dt>
            <dd>14</dd>
            <dt>field-2</dt>
            <dd>13</dd>
            <dt>field-3</dt>
            <dd>12</dd>
            </dl>

            </td>
            </tr>
            <tr>
            <th>Date</th>
            <th>Field5</th>
            <th>Field6</th>
            <th>Field7</th>
            <th>Field8</th>
            <th>Field9</th>
            </tr>
            <tr>
            <td class="text-nowrap">2018-11-13</td>
            <td>val2</td>
            <td>val2</td>
            <td>val4</td>
            <td>16</td>
            <td>val5</td>
            </tr>
            </table>

            </body>

            </html>








            <!DOCTYPE html>
            <html lang="en">

            <head>
            <title>Bootstrap Example</title>
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
            <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
            <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
            </head>

            <body>
            <table class="table table-condensed table-striped">
            <caption>Event <span class="badge">2</span>
            <dl class="dl-horizontal">
            <dt>field-1</dt>
            <dd>14</dd>
            <dt>field-2</dt>
            <dd>13</dd>
            <dt>field-3</dt>
            <dd>12</dd>
            </dl>
            </caption>
            <tr>
            <th>Date</th>
            <th>Field5</th>
            <th>Field6</th>
            <th>Field7</th>
            <th>Field8</th>
            <th>Field9</th>
            </tr>
            <tr>
            <td class="text-nowrap">2018-11-13</td>
            <td>val2</td>
            <td>val2</td>
            <td>val4</td>
            <td>16</td>
            <td>val5</td>
            </tr>
            </table>
            <hr>
            <table class="table table-condensed table-striped">
            <caption>Event <span class="badge">2</span>
            </caption>
            <tr>
            <td colspan="6">
            <dl class="dl-horizontal">
            <dt>field-1</dt>
            <dd>14</dd>
            <dt>field-2</dt>
            <dd>13</dd>
            <dt>field-3</dt>
            <dd>12</dd>
            </dl>

            </td>
            </tr>
            <tr>
            <th>Date</th>
            <th>Field5</th>
            <th>Field6</th>
            <th>Field7</th>
            <th>Field8</th>
            <th>Field9</th>
            </tr>
            <tr>
            <td class="text-nowrap">2018-11-13</td>
            <td>val2</td>
            <td>val2</td>
            <td>val4</td>
            <td>16</td>
            <td>val5</td>
            </tr>
            </table>

            </body>

            </html>





            <!DOCTYPE html>
            <html lang="en">

            <head>
            <title>Bootstrap Example</title>
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
            <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
            <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
            </head>

            <body>
            <table class="table table-condensed table-striped">
            <caption>Event <span class="badge">2</span>
            <dl class="dl-horizontal">
            <dt>field-1</dt>
            <dd>14</dd>
            <dt>field-2</dt>
            <dd>13</dd>
            <dt>field-3</dt>
            <dd>12</dd>
            </dl>
            </caption>
            <tr>
            <th>Date</th>
            <th>Field5</th>
            <th>Field6</th>
            <th>Field7</th>
            <th>Field8</th>
            <th>Field9</th>
            </tr>
            <tr>
            <td class="text-nowrap">2018-11-13</td>
            <td>val2</td>
            <td>val2</td>
            <td>val4</td>
            <td>16</td>
            <td>val5</td>
            </tr>
            </table>
            <hr>
            <table class="table table-condensed table-striped">
            <caption>Event <span class="badge">2</span>
            </caption>
            <tr>
            <td colspan="6">
            <dl class="dl-horizontal">
            <dt>field-1</dt>
            <dd>14</dd>
            <dt>field-2</dt>
            <dd>13</dd>
            <dt>field-3</dt>
            <dd>12</dd>
            </dl>

            </td>
            </tr>
            <tr>
            <th>Date</th>
            <th>Field5</th>
            <th>Field6</th>
            <th>Field7</th>
            <th>Field8</th>
            <th>Field9</th>
            </tr>
            <tr>
            <td class="text-nowrap">2018-11-13</td>
            <td>val2</td>
            <td>val2</td>
            <td>val4</td>
            <td>16</td>
            <td>val5</td>
            </tr>
            </table>

            </body>

            </html>






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 13 '18 at 23:43

























            answered Nov 13 '18 at 23:37









            MichaelvEMichaelvE

            1,2631311




            1,2631311












            • Thanks for the answer, but in this case, the description-list gets the caption properties(you can see a light gray for the description list). should i add seperate style properties for description list ?

              – user3357897
              Nov 13 '18 at 23:40











            • You will need to give it it's own styling. I've changed the snippet to show a seconds table where the list is placed with tr and td tags if you prefer that styling instead. But I'm guessing you'd want it something different.

              – MichaelvE
              Nov 13 '18 at 23:45











            • That should work for me. Thanks

              – user3357897
              Nov 13 '18 at 23:49

















            • Thanks for the answer, but in this case, the description-list gets the caption properties(you can see a light gray for the description list). should i add seperate style properties for description list ?

              – user3357897
              Nov 13 '18 at 23:40











            • You will need to give it it's own styling. I've changed the snippet to show a seconds table where the list is placed with tr and td tags if you prefer that styling instead. But I'm guessing you'd want it something different.

              – MichaelvE
              Nov 13 '18 at 23:45











            • That should work for me. Thanks

              – user3357897
              Nov 13 '18 at 23:49
















            Thanks for the answer, but in this case, the description-list gets the caption properties(you can see a light gray for the description list). should i add seperate style properties for description list ?

            – user3357897
            Nov 13 '18 at 23:40





            Thanks for the answer, but in this case, the description-list gets the caption properties(you can see a light gray for the description list). should i add seperate style properties for description list ?

            – user3357897
            Nov 13 '18 at 23:40













            You will need to give it it's own styling. I've changed the snippet to show a seconds table where the list is placed with tr and td tags if you prefer that styling instead. But I'm guessing you'd want it something different.

            – MichaelvE
            Nov 13 '18 at 23:45





            You will need to give it it's own styling. I've changed the snippet to show a seconds table where the list is placed with tr and td tags if you prefer that styling instead. But I'm guessing you'd want it something different.

            – MichaelvE
            Nov 13 '18 at 23:45













            That should work for me. Thanks

            – user3357897
            Nov 13 '18 at 23:49





            That should work for me. Thanks

            – user3357897
            Nov 13 '18 at 23:49

















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53290958%2fhtml-bootstrap-dl-horizontal-not-working-as-expected%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            How to read a connectionString WITH PROVIDER in .NET Core?

            Node.js Script on GitHub Pages or Amazon S3

            Museum of Modern and Contemporary Art of Trento and Rovereto