Solved

Columns widget

Posted on 2014-04-07
3
287 Views
Last Modified: 2014-04-10
Hi Guys,

this looks like a coulumn widget here on www.piratescove.ie

birthday parties, adventure golf etc...

i want to put something like that into the body of my homepage here

www.thedancingsoul.ie below the slider, if it is a widget how do i insert  it into the body? when it looks like i can only widgets into the sidebar?

thanks guys
0
Comment
Question by:jonathanduane2010
  • 2
3 Comments
 
LVL 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 500 total points
ID: 39982826
It's not a widget per say.  It is a framework of css and javascript to make sites responsive.  At the core is a css grid (the term you are looking for).  They are using bootstrap2 but the newest version is 3 http://getbootstrap.com/

The grid is explained here http://getbootstrap.com/css/#grid and some sample pages http://getbootstrap.com/getting-started/#examples (click on one and view source).

But the basic way it works is to create multiple containers (rows) with child divs as collapsable columns.

The sample below will be 2 columns on a small screen and collapse to 2 rows on an extra small screen.
<div class="row">
    <div class="col-xs-12 col-sm-6">Stuff</div>
    <div class="col-xs-12 col-sm-6">Stuff</div>
</div>

Open in new window

The xs, sm, md, lg sizes are determined by their media queries found in the link I have above.
/* Extra small devices (phones, less than 768px) */
/* No media query since this is the default in Bootstrap */

/* Small devices (tablets, 768px and up) */
@media (min-width: @screen-sm-min) { ... }

/* Medium devices (desktops, 992px and up) */
@media (min-width: @screen-md-min) { ... }

/* Large devices (large desktops, 1200px and up) */
@media (min-width: @screen-lg-min) { ... }

Open in new window


In order to use this, you would simply need to add the bootsrap css and js files to your page and from there, utilize the classes of rows and columns.
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39982833
If you want to make columns without adding all that framework just for that one spot you can do something simple like this.  
http://jsbin.com/wonayino/1/edit?html,output
<!DOCTYPE html>
<html>
<head>
  <style>
    .row{width:100%;}
    .col_left{float:left;width:30%;background-color:red;}
    .col_right{float:left;width:70%;background-color:purple}
    </style>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
<div class="row">
    <div class="col_left">Stuff</div>
    <div class="col_right">Stuff</div>
</div>
</body>
</html>

Open in new window

0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

840 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