Solved

Columns widget

Posted on 2014-04-07
3
284 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now