Solved

Divide <div> tag to 3 rows

Posted on 2016-07-30
9
54 Views
Last Modified: 2016-07-30
Hello, i want to divide a div tag to 3 rows in css,please let me know its codes.
Thanks
0
Comment
Question by:MOSTAGHASSI
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 3

Accepted Solution

by:
Lisa Miller earned 250 total points
ID: 41735495
Yes you can use this code
 
<div class="col-lg-12"><div class="col-sm-4"></div><div class="col-sm-4"></div><div class="col-sm-4"></div></div>
0
 
LVL 6

Expert Comment

by:Manuel Marienne-Duchêne
ID: 41735761
you could use css3 column

see this

http://www.w3schools.com/css/css3_multiple_columns.asp
0
 
LVL 4

Expert Comment

by:Branislav Borojevic
ID: 41735876
If you want to have three different rows within the div, you can use what Lisa has suggested, but rather add three col-md-12 inside of a div.

<div class="row">
  <div class="col-md-12">Column 1 - full width, represents a row</div>
  <div class="col-md-12">Column 2 - full width, represents a row</div>
  <div class="col-md-12">Column 3 - full width, represents a row</div>
</div>

Open in new window

0
WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

 

Author Comment

by:MOSTAGHASSI
ID: 41735894
But you have used class="col-md-12" ,i think it is from bootstrap, i don't use bootstrap.
0
 

Author Comment

by:MOSTAGHASSI
ID: 41735896
I use DW CC 2015 , and i found it has some bootstrap components like Container,can i use it as div?
0
 
LVL 4

Expert Comment

by:Branislav Borojevic
ID: 41735898
You can call them any way you want.

<div class="row">
  <div class="column-full-width">Column 1 - full width, represents a row</div>
  <div class="column-full-width">Column 2 - full width, represents a row</div>
  <div class="column-full-width">Column 3 - full width, represents a row</div>
</div>

Open in new window


The point is to add a CSS statement that would make that class 100% width of the row, so that they would stack
0
 
LVL 4

Assisted Solution

by:Branislav Borojevic
Branislav Borojevic earned 250 total points
ID: 41735901
Try something like this:

<html>
<head>
<style>
.column-full-width {
    -webkit-column-width: 100%; /* Chrome, Safari, Opera */
    -moz-column-width: 100%; /* Firefox */
    column-width: 100%;
    width:100%;
    margin-bottom:15px;
    background:#e1e1e1;
}
</style>
</head>
<body>
<div class="column-full-width">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius.
</div>
<div class="column-full-width">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius.
</div>
<div class="column-full-width">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius.
</div>
</body>
</html>

Open in new window

0
 

Author Comment

by:MOSTAGHASSI
ID: 41735904
Thanks, Branislav Borojevic, but these are 3 separate div where is their container (  <div class="row">)?
0
 
LVL 4

Expert Comment

by:Branislav Borojevic
ID: 41735906
My bad, just put them inside a div and that should do it.

I omitted the <div class="row"> accidentally. Just wrap these divisions within another div and you should be good to go. Also, add CSS width to that row class.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question