HTML5 & Responsive Designs

Everything related to the visual and coding aspects of websites.
Post Reply
Chibi
Posts: 592
Joined: Wed Jul 04, 2012 7:17 am
Location: Themyscira
Contact:

HTML5 & Responsive Designs

Post by Chibi »

So, I have a few design questions and I'm hoping you guys can help me. :blush:

First, HTML5. Do you have any sites coded in HTML5? Have you coded in HTML5 before, or have you converted any of your sites to this new language? I looked up what was new with it, and except for a few new tags, I can't find anything "revolutionary", so to speak. I've heard some people say on their fanlistings/sites that they have been "converted" to HTML5 - what exactly do they mean by that? That they're using the new tags?

Second, responsive designs. I've seen some shrines from Amassment members that have a responsive design and I want my sites to have that, too, and to finally learn how to do it. So... how exactly do you create a responsive design? Is it difficult or incredibly time-consuming? I've never done a website with a responsive design, but I'm eager to learn! If you have any tutorials on the subject, feel free to redirect me to those.

That's all the questions I have at the moment. XD Any help will be greatly appreciated! :heart:
nyxmidnight
Communications Staffer
Posts: 1078
Joined: Sat Oct 13, 2012 7:55 pm
Location: Canada
Contact:

Re: HTML5 & Responsive Designs

Post by nyxmidnight »

I'll be happy to help, Chibi!

First off, I do have some sites in HTML5! Paper Scraps, Sacred Vessels, DILF, So Scandalous!, this page here and Nyx's Lounge demo. It's much more of a change if, like me, you start off from XHTML, where everything needed a closing slash/tag. There are some deprecated tags and some new ones, and now you can't write tags in all caps (I remember when I used to do this, ouch).

The biggest change, and I think that's what people mean when they say they converted to HTML5, is actually CSS3, which opens up a whole new world of possibilities. The progress bar on Paper Scraps and the one pager shrines page? All CSS3. The responsiveness? CSS3. Rounded corners, embedded fonts, the imageless gradient background on DILF? CSS3. Even the menu on the demo is mostly CSS with a tiny bit of JS thrown in.

As for responsiveness, it can be hard to wrap your head around it and time consuming to code. This is why I use the built-in responsiveness from Bootstrap! Bootstrap is a framework that uses HTML5, CSS3 and jQuery to make it easy and fast to build a basic website with a grid and responsive. I know I just said a lot of scary buzzword, but don't worry, if you understand CSS classes it's pretty simple. You download the Bootstrap kit and start a new HTML file with this:

Code: Select all

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <h1>Hello, world!</h1>

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>
  </body>
</html>
and you insert whatever you want between the body tag and the jQuery! (The jQuery has to stay at the end of the page for performance reasons.)

Bootstrap is built with a grid of 12 columns, meaning that the width of your columns for your layout have to add up to 12. For example, for a three column layout, you write this:

Code: Select all

  <body>
    <h1>Hello, world!</h1>
   <div class="container">
    	<div class="row">
    		<div class="col-md-4">
    			This is column 1
    		</div>
    		<div class="col-md-4">
    			This is column 2
    		</div>
    		<div class="col-md-4">
    			This is column 3
    		</div>
    	</div>
    </div>

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>
  </body>
where "container" is the container of your site, "row" is a row of columns, and "col-md-4" is a column (col-) measuring 4/12 columns (-4) wide in the grid for a medium-sized screen (md) (the responsive part). 4+4+4=12! You can have 6 columns each 2/12 wide, or 2 columns 6/12 wide, or you can even have just 1 column 12/12 wide, it's up to you! It just has to add up to 12. You can have more than one row as well, of course.

I hope this was helpful! If you have questions about all this, don't hesitate to ask!
Join in the Tale, in the Blight, of Conquest and Lies
Come the Sun, to Tarnish in the Sky
Vow that we shall Tear the Light - Dark seizes the Throne
Lost in thoughts, all alone
dubiousdisc
Administrator
Posts: 2535
Joined: Thu Jun 21, 2012 5:49 pm
Contact:

Re: HTML5 & Responsive Designs

Post by dubiousdisc »

HTML5: There are new tags such as section, article, aside, header, footer...I recommend reading this for everything you need to know about that.
The REAL revolution is in the <canvas> element...but you aren't gonna see a lot of that in fansites.

Responsiveness: Everything Nyx said, and if you prefer to hand-code things personally, this is your best friend:

Code: Select all

@media screen and (max-width: 600px) {
body
{ .... }
}
You can have as many of these queries as you want in your CSS and each one contains a different set of rules to be activated at different sizes.

Your other best friend are ways to display your site on common resolutions for mobile devices. I'm using the Web Developer Toolbar addon for Firefox which has an option to view how a certain site looks at such sizes.

Hehe, I've been working behind the scenes to adapt some older designs to responsive in the last few days actually. It's easy, don't worry.
Chibi
Posts: 592
Joined: Wed Jul 04, 2012 7:17 am
Location: Themyscira
Contact:

Re: HTML5 & Responsive Designs

Post by Chibi »

Thank you so much, guys! I'm not so worried about HTML5 now, I'll just check dubious's link the new things with CSS3. I didn't use XHTML much (I always hated having to close tags each time, haha).

As for responsive design, I'll definitely check out Bootstrap. So can I still make any kind of layout while using Bootstrap, like I would normally do? Or are my designs limited with this framework?
nyxmidnight
Communications Staffer
Posts: 1078
Joined: Sat Oct 13, 2012 7:55 pm
Location: Canada
Contact:

Re: HTML5 & Responsive Designs

Post by nyxmidnight »

Chibi wrote:Thank you so much, guys! I'm not so worried about HTML5 now, I'll just check dubious's link the new things with CSS3. I didn't use XHTML much (I always hated having to close tags each time, haha).

As for responsive design, I'll definitely check out Bootstrap. So can I still make any kind of layout while using Bootstrap, like I would normally do? Or are my designs limited with this framework?
You can make anything you want with the framework! In fact you don't have to use the columns at all! You can just built your layout inside the container if you want. For responsiveness, though, you can build your site inside one single 12/12 column and things will squish pretty well. You can even make a layout in which some parts will only display on large or small screen just with the addition of a class, and the navigation given in the examples can be modified at will and it will all collapse on small screens. If you have any questions, don't be afraid to ask :yay:
Join in the Tale, in the Blight, of Conquest and Lies
Come the Sun, to Tarnish in the Sky
Vow that we shall Tear the Light - Dark seizes the Throne
Lost in thoughts, all alone
Chibi
Posts: 592
Joined: Wed Jul 04, 2012 7:17 am
Location: Themyscira
Contact:

Re: HTML5 & Responsive Designs

Post by Chibi »

nyxmidnight wrote:
Chibi wrote:Thank you so much, guys! I'm not so worried about HTML5 now, I'll just check dubious's link the new things with CSS3. I didn't use XHTML much (I always hated having to close tags each time, haha).

As for responsive design, I'll definitely check out Bootstrap. So can I still make any kind of layout while using Bootstrap, like I would normally do? Or are my designs limited with this framework?
You can make anything you want with the framework! In fact you don't have to use the columns at all! You can just built your layout inside the container if you want. For responsiveness, though, you can build your site inside one single 12/12 column and things will squish pretty well. You can even make a layout in which some parts will only display on large or small screen just with the addition of a class, and the navigation given in the examples can be modified at will and it will all collapse on small screens. If you have any questions, don't be afraid to ask :yay:
Thank you! :heart: I'll try it out in my next layout and if I have any questions, I'll post here again!
Post Reply