Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

displaying data when using bootstrap framework

I have an edit form which .form-horizontal and .control-label. However, now I want to display one record to the user (for example, details of a users profile). So I envision something like this:

First Name:        Foo Last Name:         Bar Job:               Something 

What is the best way to do this using bootstrap framework? I wanted to use the same structure as my edit form but since I'll be showing data, I can't used the .form-horizontal class. If I use the <table> tag then what class could I use?

like image 907
birdy Avatar asked Jan 08 '13 19:01

birdy


People also ask

Is Bootstrap still relevant 2020?

Fast forward to nearly a decade later. With the rise of JavaScript front-end frameworks and an ever-changing landscape of technology and tools, a lot of folks are out there asking if Bootstrap is still relevant in 2021. The short answer is yes.

How does Bootstrap framework work?

Simply put, Bootstrap is a massive collection of reusable and versatile pieces of code which are written in CSS, HTML and JavaScript. Since it is also a framework, all the foundations are already laid for responsive web development, and all developers have to do is insert the code into the pre-defined grid system.

Can you do everything with Bootstrap?

Bootstrap will not do everything for you, but it provides a set of reasonable defaults to choose from and it will help developers to concentrate more on the development work than worrying about design, and help them to get a good looking website up and running quickly.

Is it good to use Bootstrap in project?

Creating page layouts needs a good grid. Bootstrap has this benefit: one of the best responsive, mobile grid system. It's really easy to use and if you need to work through columns, then you're in the right place using Bootstrap. Very handy when you want to hide some content based on screen size.


1 Answers

For Bootstrap 3

Bootstrap 3 provides a 'Horizontal Description' class to do present data exactly like you wish.

http://getbootstrap.com/css/#horizontal-description

With your example data, you would do something like this:

<dl class="dl-horizontal">   <dt>First Name</dt>   <dd>Foo</dd>   <dt>Last Name</dt>   <dd>Bar</dd>   <dt>Job</dt>   <dd>Something</dd> </dl> 
like image 135
routeburn Avatar answered Sep 22 '22 00:09

routeburn