Solved

Columns widget

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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…

770 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