Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 65
  • Last Modified:

Divide <div> tag to 3 rows

Hello, i want to divide a div tag to 3 rows in css,please let me know its codes.
Thanks
0
MOSTAGHASSI
Asked:
MOSTAGHASSI
2 Solutions
 
Lisa MillerCommented:
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
 
Manuel Marienne-DuchêneITMCommented:
you could use css3 column

see this

http://www.w3schools.com/css/css3_multiple_columns.asp
0
 
Branislav BorojevicCommented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
MOSTAGHASSIAuthor Commented:
But you have used class="col-md-12" ,i think it is from bootstrap, i don't use bootstrap.
0
 
MOSTAGHASSIAuthor Commented:
I use DW CC 2015 , and i found it has some bootstrap components like Container,can i use it as div?
0
 
Branislav BorojevicCommented:
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
 
Branislav BorojevicCommented:
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
 
MOSTAGHASSIAuthor Commented:
Thanks, Branislav Borojevic, but these are 3 separate div where is their container (  <div class="row">)?
0
 
Branislav BorojevicCommented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now