How to set up proper CSS 3 for a website

I am looking to set up a proper design spec for a website, but I do not want mobile browsers to have a problem viewing the web site.  I know that if the page is too wide, problems may surface for viewers to view a page and so and so forth.  How could I set up the website so that it is viewable in any browser in any sized screen?  Is there a CSS/HTML template to start from?  Is there a framework that most people use?  Just like most popular websites, I want the top banner to be 100% wide in the screen but as far as the rest of the site content, I would like it to take up some space but not 100% width.  Can anybody help me on this so that I could get started on this right away?  Thanks!
Who is Participating?
Julian HansenConnect With a Mentor Commented:
There are several you can look at

Bootstrap and boilerplate are both widely used mobile first / friendly templates.

Bootstrap (

Boilerplate (
Scott Fell, EE MVEConnect With a Mentor Developer & EE ModeratorCommented:
At the heart of what you are asking about is using media queries.
@media (max-width: 700px) {

Open in new window

The code above would make an item's width 50% on a large screen and 100% on the small screen.  

Setting up for multiple viewports on one page will take some work.  I prefer to use libraries like bootstrap and foundation

Both have the basic css/grid ready to go along with javascript/jquery helpers.  The responsive grid is the heart. Instead of writing media queries, they are done for you and all you need to do is apply a class
<div class="row">
  <div class="col-sm-12 col-md-3">Narrow Left Large screen/full width small screen</div>
  <div class="col-sm-12 col-md-9">Wide right Large screen/full width small screen</div>

Open in new window

Check out the examples and you can get a better idea.

Both foundation and bootstrap are similar, if you like to use template themes,  you will find more written against bootstrap.
brunoConnect With a Mentor Commented:
Bootstrap, boilerplate are all good starting points for your code, but you want might to start with some general knowledge of responsive web design, which is the concept of using fluid grids, flexible images, and media queries.
I've requested that this question be closed as follows:

Accepted answer: 168 points for padas's comment #a39814217
Assisted answer: 166 points for brunobear's comment #a39819848
Assisted answer: 166 points for julianH's comment #a39814164

for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.