Building a Responsive Layout With Skeleton: Finishing Off
videos

Building a Responsive Layout With Skeleton: Finishing Off

Tutorial Details
  • Topic: Responsive Web Design
  • Difficulty: Intermediate
  • Screencast duration: 1 hour 20 mins
This entry is part 5 of 8 in the series Building a Responsive Layout With Skeleton

During previous screencasts in this series we’ve covered a lot of ground, building our responsive (or adaptive) layout with the Skeleton boilerplate. It’s now time to finish all the final details; arguably the most time-consuming part of any website build!

Over the course of these three screencasts we’ll be looking at nesting columns, flexible video embeds, Skeleton’s form elements and tabs. We’ll flesh out any missing markup and complete the accompanying CSS. There’s a lot to talk about; well over an hour of footage to absorb, so you might need to mentally prepare yourself..


Nesting Columns

We’ve previously looked at the sixteen column structure of Skeleton and how the styling alters with a few select media queries. We’re now going to look at what happens when we nest columns within each other.

Alternatively, Download the video, or subscribe to Webdesigntuts+ screencasts via iTunes or YouTube!


The Sidebar

It’s time to add some meat to our sidebar. We’ll add all the necessary markup, then begin styling the various sections. Whilst we’re doing that we’ll quickly talk about Skeleton’s form styling and we’ll grab some web fonts for our icons.

Alternatively, Download the video, or subscribe to Webdesigntuts+ screencasts via iTunes or YouTube!


Flexible Video

If you’re serious about flexible web design, you’ll need to know how to handle flexible embedded content. In this video we’ll take a look at making our video content elastic. There’s more to be discussed on the topic, but this basic approach is a great start.

Once we’ve covered that, we’ll quickly talk about Skeleton’s tabs, plus we’ll add some promotional banners which alter depending on the media queries being used.

Alternatively, Download the video, or subscribe to Webdesigntuts+ screencasts via iTunes or YouTube!


Flexible Embeds

The subject of flexible embeds is quite an interesting one. Here, for your dissection, are the basic snippets you’ll need to start things off. First the markup:

<!--
first we'll need a container for our video,
the 'restraining' element.
-->
<div class="embed">
	<!--
	here's your embedded content,
	whatever it may be..
	-->
	<iframe></iframe>
</div><!--end embed-->

And then the styles:

/*
firstly we deal with the container element
making it relatively positioned
and defining its height proportionally
to its width - giving us a 16:9 ratio
*/
.embed {
	position: relative;
	padding: 0;
	padding-bottom: 56.25%; /* 16:9 ratio*/
	height: 0;
	overflow: hidden;
}
/*
then we make the actual embedded content
behave in terms of its dimensions
and its position within the container
*/
.embed iframe,
.embed object,
.embed embed {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

Note: In the screencast I set the height of the .embed container at 56.25%, I should have set it to zero (hey, I was getting tired..) In most cases this won’t have any detrimental effects, but I thought it worth mentioning :)


Additional Resources

Some useful links to further build on what’s been covered in these videos.

Series Navigation<< Building a Responsive Layout With Skeleton: jQuery PluginsBuilding a Responsive Layout With Skeleton: Widescreen >>

Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • Pingback: Building a Responsive Layout With Skeleton: Finishing Off | Shadowtek Hosting and Design Solutions

  • Dmitriy O.

    Thank you for your lessons!

  • Amie

    Cool! Thanks.

  • Dougieladd

    Thanks Ian… this responsive series has been invaluable. I’ve downloaded the vids to drum them into my brain… Thanks again!!

  • http://paintndesign.com phil

    Hey Ian,

    Skeleton is great, ive tried bootstrap and kinda prefer this framework over bootstrap even tho bootstrap has some additional stuff like plugins etc.

    Can we see more tutorials with skeleton framework but different layout design. Also if and when one of the wonderful people at webdesign tuts can do tutorials on responsive wordpress themes .

    Thanks and lovin it,

    Phil

  • Hamid

    thank you Ian, i hope watching more video tuts from you lan:-) it was great lessons.

  • Pablo

    Finally finished!! Thanks for al your help, and I hope to see/hear you again. Your videos are calm, professional and you have a nice voice to listen to.

  • supporf

    awsome!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    great
    1000 000 000 thank you

  • Alistair

    Thanks for the thorough guidance here, i’ve been looking for a step by step and reasoning for responsive specifically with a grid. This looks the place to start.

    Thanks again

  • Marcel

    Thank you Ian.

    This series has been incredibly enlightening. Your methodology is clear, thorough and easily executed. It has so much usefull information crammed into each screen cast. I appreciate all the time you have invested in getting this out. What a sterling tutorial series! Working through this has enabled a HUGE leap forward for me.

    Thanks a ton!

    • http://www.snaptin.com Ian Yates
      Author

      I really love this kind of comment, not just because it massages my ego :) but it’s great to hear that people are genuinely learning from series like this. Thanks!

  • Karam S

    @IanYates this has been the best tutorial series ever in my opinion. I’ve never ever bothered to learn code until now, and i hope we get to complete this website :)

    I’ve gotten in to a bit of a problem when i was trying to create the side bar. It is not aligning to the right of the screen and a few of the sections aren’t behaving properly. I think its because my left column is not aligned correctly but i dont know how to fix it.

    I’ve uploaded the site to DropBox http://dl.dropbox.com/u/16612410/index.html so if you could check it out please do.

    Thanks (:

    • http://www.snaptin.com Ian Yates
      Author

      Hey there Karam, looking good :)

      The solution is pretty straight forward; you have an unclosed div (columns sixteen) wrapping the flexslider. It effectively means that all the other divs thereafter are trying to nest within it, but don’t have the room to do so. Stick a </div> after your flexslider and you should be good to go!

  • Bryan

    So much respect for the Web Symbols Typeface!

    Thank you for all your hard work!

  • Pingback: Responsive based layouts | Pearltrees

  • Leo

    Hi Ian,
    Humble Greetings to you !
    Thank you very much for such an extensive tutorial. You are simply awesome. The way you have walked us through the entire process is just unbelievable. You really have patience to explain in such detail. I really admire your tutorials as well Jeffrey ways tuts… you guys simply rock !!!!

    Just a small Q though… i have been following the screen cast…. when i put the thumbnail image in the 3 column container area ( original size of image 300px x 300px as it is in your case study ) but for some reason it does not auto fit in to 160px x 160px which is the dimension for .three column as per the base.css skeleton structure. perhaps you could advise me please.

    Thanks once again for such a wonderful session.

    Regards
    Leo

    • http://www.snaptin.com Ian Yates
      Author

      Hey Leo, it sounds to me like you’ve forgotten to add the rule: img {max-width: 100%}

      This is the premise for all responsive images and states that they’ll never be larger than their parent container. Does that solve things?

  • Leo

    Dear Ian,

    Greetings to you !

    You are right. I did forget to put the {max-width:100%} which i realised as soon as i hit the submit button on the comment section here. Thank you for your help though.

    I am now in the process of completing the or sidebar section and i noticed that when first i followed step by step video the Search Buttons and the Subscribe buttons were not aligned inline but then in one of the screen on the video that you had some additional styling to the search button to align in a particular way… so i viewed the original css file from your demo and copied and pasted and it worked…perhaps i didn’t notice that part on the video…..

    I really Thank you for your wonderful video. It has helped me a lot… Is there any possibility in the future that you could perhaps make a tut on converting this Skeleton Boilerplate HTML to a wordpress or drupal cms…that would be awesome to learn.

    Thanks once again Ian much appreciated.
    Have a nice weekend. :)

    • Nathan

      Hello,

      I would also enjoy a tuts about converting this to a CMS (WordPress preferably).

      Thanks

  • Marko

    Hi there!

    I got one more question! :)

    If I have left side side bar (five columns) and main content right (eleven columns) how to get when I’m
    on ” /* All Mobile Sizes (devices and browser) */ @media only screen and (max-width: 767px)” resolution
    to have main content on top of side bar?! … I of course get first side bar then scroll to main content!?!

    I’m noob! ;)

    Thx :)

    • http://www.snaptin.com Ian Yates
      Author

      Hi Marko – this is one of the unfortunate limitations with CSS as it’s currently used; it’s dependent upon the order of the markup :( To switch things round in this case, we’d either have to float all objects (columns etc.) to the right, instead of the left, or we’d have to employ JavaScript to switch the order of the DOM around..

      Neither one is a particularly elegant solution, but I’ll be interested to see what you come up with!

  • Benn

    What would you reccommend for displaying tables?
    Would you instead nest the content into div’s with the required column class. Or is there a way of using tables with the responsive design?

    Thanks.

    • http://www.snaptin.com Ian Yates
      Author

      Hi Benn – tables are still a bit of an unknown quantity where responsive web design is concerned. There are a few techniques out there, take a look at this roundup of rwd table approaches by Chris Coyier, there are some great examples in there :)

  • Felipe

    What does the “clearfix” do?

    Great tutorial btw

    • http://www.snaptin.com Ian Yates
      Author

      Hi Felipe,

      Adding a class of clearfix allows an element to ‘self clear’ any floating elements within it. See it as an alternative to placing an additional element in your markup with style="clear: both".

      The actual css for clearfix (in Skeleton’s case) looks like this:

      .clearfix:before,
      .clearfix:after {
      	content: '\0020';
      	display: block;
      	overflow: hidden;
      	visibility: hidden;
      	width: 0;
      	height: 0;
      }
      .clearfix:after {
      	clear: both;
      }
      .clearfix {
      	zoom: 1;
      }
      

      There are differing approaches to this (it needn’t even be called clearfix if you prefer something else), but what it’s effectively doing is adding a blank pseudo element after any elements which maybe within it.

      The pseudo element is then displayed as block and instructed to clear: both; . This forces the parent container to wrap its floating elements.

      It’s a technique which has been around a while now; see what Chris Coyier has to say on the matter if you want a better explanation :)

  • janice

    Hi,

    I’ve enjoyed your series very much and skeleton does seem like a great starting point for responsive layouts…thanks.
    Just wondering though would it be better to add your classes to the tag rather than nesting the within a . It seems to me the is surplus to requirements but am open to your recommendations?

    Cheers

    • http://www.snaptin.com Ian Yates
      Author

      Hi Janice – sorry, the snippets within your comment appear to have been swallowed up :( Any chance you can describe what you’re talking about again, but place your snippets within [html] [/html] shortcodes? Thanks!

  • Derek

    Ian,

    Great tutorial series. I’ve been checking out tons of CSS frameworks (e.g. Bootstrap, Foundation, SimpleGrid) and keep coming back to Skeleton. I like how “light-weight” it is compared to some of the others. One of the hesitations I have for using Skeleton in a production environment is that I’d like to go beyond the 960gs. Do you plan to do a tutorial in the near future to show how to use Skeleton for larger screen sizes?

    Again, great work on this tutorial series!

    Cheers,
    Derek

    • http://www.snaptin.com Ian Yates
      Author

      Hey Derek,

      I’m definitely planning a “super-size your skeleton” post (actually I quite like that name..) as I think it will demonstrate a number of interesting aspects. Not only will we have to physically wrangle the framework to spread across the screen, but we’ll need to take some important usability factors into account.

      Watch this space!

      • Derek

        Can you give us an estimated timeframe :) Very anxious…

        • http://www.snaptin.com Ian Yates
          Author

          I have a lot on my plate at the moment, but I’ll get on it as soon as possible! (Short answer: no, sorry…)

  • Pingback: Best of Tuts+ in April 2012 | Webdesigntuts+

  • Pingback: Best of Tuts+ in April 2012 |

  • Pingback: Best of Tuts+ in April 2012 | Flash Video Traning Source

  • Pingback: Best of Tuts+ in April 2012 | Gallery.Clipapic

  • Pingback: Best of Tuts+ in April 2012 | Shadowtek Hosting and Design Solutions

  • Pingback: Best of Tuts+ in April 2012 - Milk-Break

  • Pingback: Best of Tuts+ in April 2012 | Omega Pixels

  • Pingback: Best of Tuts+ in April 2012 | How to Web

  • Pingback: Best of Tuts+ in April 2012 | clickshots

  • Tatiana

    Dear Ian

    thanks a million for the whole video series!!!! I really enjoyed it and I definitely learned some new useful things I did not know.

    I look forward to watching the “Super-size-skeleton” part!!

    :)

  • http://bowesales.com Jesse

    This is such a great series. Thank you so much!

  • Pingback: Wordpress Leaks » Best of Tuts+ in April 2012

  • Pingback: Best of Tuts+ in April 2012 « Webby Treats

  • Pingback: Best of Tuts+ in April 2012 - InterlaceLab

  • Pingback: Best of Tuts+ in April 2012 « CSS Tips

  • Lily

    Hi Ian,

    is it just me or does the video skip a step, at about 18:08? A couple of seconds later you can see a bunch of new codes in the layout.css and we just added the webkit reset in the step before.. ( Although that doesn’t stop me, as thanks you these videos I’ve learned to understand better how to search through the code with “inspect element”, so I think I can find the part on my own.. )

    That being said, I’ve been doing this step by step with the video tutorials for the past couple of days now, and it has been great! I’ve even forgot to have lunch! :D I’m learning so many new things, it’s amazing.. Thank you so much!

    Looking forward to new tutorials from you!

    • http://www.snaptin.com Ian Yates
      Author

      Hi Lily – you got me! I can’t remember exactly what happened there (perhaps a fighter jet screamed past the window) but I could have made the cut and edit a bit smoother..

      Hopefully you haven’t missed any crucial details – feel free to post any questions which you may have. Cheers :)

  • http://blogtipswriter.com Tho Huynh

    Thanks a lot. Responsive themes will be a huge trend this year. Thank you for showing us how to make a responsive wordpress themes

  • Dave

    Hi Ian

    I came through this tuts today. I didnt watch, I literally consumed these videos : ))

    Honestly, not only informative, easy to follow and useful, videos are interesting to watch. Not many tutorials out there can brag that they are not boring : ))

    Well done and thanks a million! Was learning something new in every video.

    I have one question about browser support, in IE9 demo looks great, but IE8 gives out messy layout. unfortunately almost 45 of IE users still use IE8 (as far as I know). Can you recommend me any possible solutions I could make it work in IE8? point any directions, any ideas ? : ))

    Thanks again!
    God Bless!

    Dave

    • http://www.snaptin.com Ian Yates
      Author

      Hi Dave – I haven’t looked too deeply into legacy browser support yet (though screenshots suggested to me IE8 was okay). I’ll take a look when I pick this project up again; there’s call to take this further in a number of ways, but I’ve just been too busy recently!

      If you’d like to explain more about the specific problems you’re seeing in IE8 I’ll see what I can suggest. Thanks:)

  • http://www.benflodge.com Ben L

    Wow, I’ve just finished up this tutorial series and i’ve got to say this is one of the most important tutorials for people new to web design at the moment. It covers the most important html, css and shows the implementation of simple Java script in a responsive, pixel perfect environment. If you do decide to make this into a word press tut as you have mentioned I think we will all owe a hell of a lot to you. I’ve just finished my first word press project and I’d love to see how you would implement this. thanks a lot Ben.

    • http://www.snaptin.com Ian Yates
      Author

      Thanks Ben, I’m glad you enjoyed the series :) WordPress tutorials coming soon, I haven’t forgotten!

  • md

    great tutorials!!! I love responsive and skeleton is fantastic! Thanks for this tuts

  • Saud

    Great tut : )

    Why you used in your class names a spaces ?
    in fact I enjoyed in your series , if you have time we need another series : )

    Thanks ,

    • http://www.snaptin.com Ian Yates
      Author

      Thanks Saud :) Multiple class names can be declared on single elements without any problem. For example, I might have a few of divs like this:

      <div class="wrapper main"></div>
      <div class="main"></div>
      <div class="wrapper sub"></div>
      <div class="wrapper promo"></div>
      

      I can target all the wrappers like this:

      div.wrapper {
        background: green;
      }
      

      and I can target them more specifically like this:

      div.main {
        font-size: 14px;
      }
      

      That last style rule will target the first two divs in our example, but we can be even more specific thanks to the use of two classes. The following will target just the first div:

      div.wrapper.main {
        font-size: 14px;
      }
      

      It effectively applies its rules to a div with both a class of wrapper and main. Hope that helps!

  • Pingback: Use Skeleton Boilerplate to build responsive website

  • Francis Thibault

    Awesome work! Following from the start! I noticed that skeleton does not support tabs anymore :

    V1.2 (6/20/2012): Pruning Skeleton down to some more bare bones :)
    Remove tabs and all JS

    • http://www.snaptin.com Ian Yates
      Author

      Ahhh yes, well spotted – the first update he’s made in a while. Thanks for pointing it out :)

  • http://www.futuremultimedia.in indore

    AWESOME WORK I LOVE THIS

  • Ian

    Hi Ian

    I just want to say thanks a million for taking the time to do such a great tutorial. I was a bit perplexed by responsive design so I was delighted to follow this and build it with you ; ) I have learned so much and I now have a great reference resource!

    Thanks a mil, by far the best and clearest tutorial I have seen for any subject.

    Well Done!!!

    Regards,
    Ian C

  • http://www.dryfly.ca Doug Smith

    Hello Ian,

    Thanks very much for these fantastic videos and tutorials. You’ve done an amazing job of walking through the steps and ideas behind using Skeleton.

    I have a question. Using Firefox, once I put a video on my website I was no longer able to freely resize the browser window. The resizing works normal with ie, chrome and safari. For example, suppose I have 8 columns, 4 columns and 4 columns where the video is the 8 columns. I can resize the window down until the video needs to resize smaller. At this point, Firefox will not go any smaller. If I leave the page, make Firefox windows smaller and return to the offending webpage, the video is resized smaller. Now I will not be able to make the firefox window larger. Have you ever seen this happen?

    thanks

    • http://www.dryfly.ca Doug Smith

      Turns out this is/was a known Flash bug with Firefox. Adobe fixed it, it is in their Adobe Flash Player for Firefox, Mozilla, Netscape, Opera 11.3.300.268.

      It was reported as a Mozilla Firefox bug many times: https://bugzilla.mozilla.org/show_bug.cgi?id=765788

      cheers!

      • http://www.snaptin.com Ian Yates
        Author

        Thanks for that Doug – always helpful when folk post solutions as well as problems!

  • Arty

    How can you set the sidebar (aside) to have a height:100%? – when I make many articles they pop under the aside.

    Btw, this tutorial is AWSOME, I learned so much! It’s my first time using HTML5 and let me tell you, it’s great! So thank you for spending so much time recording this, mad respect!

    • http://www.snaptin.com Ian Yates
      Author

      Glad to hear it Arty :)

      I’m not sure what you mean about the aside though – it should stay on the right, with your articles to the left, irrespective of the height of either… They shouldn’t be moving under one another. Any chance you can post a screenshot?

  • Eoghan

    This has been mentioned already but not in much detail.

    For anyone following this tutorial around the time of this comment or later:

    Simply doing what Ian does to make the tabs work is not enough anymore as Skeleton have removed support for tabs now.

    The CSS for styling the tabs is removed as well as the tabs.js file. However, its simply a matter of going into the source code of the fully completed example to get what you need.

    base.css contains all the css needed for styling the tabs and the index file contains a link to the tabs.js file

    I spent quite a bit of time wondering what I was doing wrong, hopefully this will save some people time!

    • Patrick

      Cheers mate. I was about to try and do this but its always more reassuring when someone else has already done it :)

  • http://igerli.com Stefano

    I am having a little problem with the three culumns alpha thumbnail here is my demo link http://igerli.com/magazine/

    • http://www.snaptin.com Ian Yates
      Author

      Two things: you need to set img { max-width: 100% } so that the thumbnail is contained within its parent’s dimensions. Also, you have a typo on the other column – you’ve called it seven culumns omega. Fixing those two details should sort everything out!

      • http://igerli.com Stefano

        Thanks I just realised the “culumns” error when I was clicking the post button but the other one was your help.

  • http://igerli.com Stefano

    I am having a little problem with the banner and the video bottom border can you please check it here is my demo link: http://igerli.com/magazine/
    And I really love your videos.

  • Rich

    Hi Ian,

    Great work but a couple of pointers.

    1. A header tag inside a footer tag is invalid syntax
    2. You have a and then within that an article tag. Surely this could just be and you could then do away with that div?

    Sorry to be picky!!

  • Gabe

    Hey Ian.

    During my spare time I’ve been going through these tutorials and have found them to be very informative. I’ve already employed some of the techniques I’ve seen in my own projects. In the past I have always used padding to make blocks elements taller but you use line-height in all your code. Is there an advantage to this and is this a best practice that I should be following? Perhaps there’s an article you can forward me to that speaks of the advantages and disadvantages if any?

    Hopping to complete the rest of the tutorials by the end of the weekend!

    Thank you in advance.

  • Mark Hallam

    Amazingly good tutorial!! Thank you so much for your astounding effort!

  • Tusk

    Amazing tut. I did have one question though. I use quite a big screen, (22inch) and when i view the site in a smaller browser no higher than 960 it works perfectly, but when i enlarge it to my full screen size the design of the site changes. The navigation (instead of being across the top) goes vertical on the left side along with the bottom footer area. Is there something I missed that I should of taken out, or put in for that matter, that would prevent the site from changing to that style. I prefer the navigation going across the top middle and the footer stuff to stay at the bottom of the page.

    • http://www.snaptin.com Ian Yates
      Author

      Hi Tusk – I think you’ve grabbed the sourcefiles from the next tutorials in the series.. Building a Responsive Layout With Skeleton: Widescreen covers the wide layout in question (but it isn’t obligatory). Removing the last media query will solve things – check out the tutorial :)

  • Pingback: Building a Responsive Layout With Skeleton : Widescreen | JDesign's Blog

  • Timothy

    A MASSIVE thank you to webdesign.tuts and Ian, these tutorials are a brilliant and priceless resource for all of us out there trying to learn in our spare time.

    I am slowly working my way through them, though each 20 minute screen cast usually takes me about 4 hours!

    I got stuck recently at the same point as ‘Leo’ – I thought i would check the comments to see if anyone else was having similar problems. Never did i expect to see Ian replying to each one, so again, another MASSIVE thank you for your time and knowledge!

  • http://www.facebook.com/profile.php?id=671361507 Will Vincent

    Setting display:none does not prevent the thumbnail images from being loaded. So, while it does save screen real estate on mobile and tablet devices, it’s not saving any bandwidth.

  • Herve Gbedji

    Hello Ian ,, thanks for the heads up with skeleton . Very helpful . I do have an issue .

    i understand quite right , how the grid system and layout work .

    I finished building a site that covers entire screen with skeleton . And in the last minute the designer has changed mindset . So now the whole site would be centered in the middle of the screen . You know like when a div has a margin:auto stuff .

    i am facing a challenge of putting all that site (actually shrinking the site) in the center of the page , with a left and right white space . i tried wrapping all my body code with a and then applying margin:auto to it , but its doesnt work , or it works just for the top part of the site .

    Do you think there is anyway of solving that problem , without destroying all the previous work .

    the site does not change . but Just to shrink it so we can see a left and right white space .

    here is the link of test http://music.hervegbedji.com

  • http://www.facebook.com/people/Ahim-Anyd/100002645118503 Ahim Anyd

    good tutorial, ty http://www.wowthemes.net