I've recently been tasked with the of making a website for a department in my school. One problem I've encountered is that the webpage will appear differently on all screens and like to know if it exists some kind of tag or way in css to make it auto adjust on all screens.
There is no easy answer, certainly none that would fit here. Here's a good place to start:
Here is a good introduction to responsive web design, which will help you deal with how your sites will appear on different screen sizes, and different devices. Good luck.
http://blog.teamtreehouse.com/beginners-guide-to-responsive-web-design
Try using media queries. Please check:
Media Queries
Take a look at responsive CSS: W3Schools Responsive CSS. This includes information about how to make your own as well as examples of existing popular frameworks such as Bootstrap and Framework.
Related
Okay,I designed my webpage to my liking. Finally. But of course, I designed it on a Chromebook with a 1366x768 resolution. So when I looked on my 1600x900 resolution computer, everything is jacked up. How do I use responsive design to get my webpage to look the same on a 1600x900 resolution as it does on a 1366x768? That's just an example. I would eventually like to format my website for mobile phones, but right now, I am focusing on laptop and desktop resolutions. Any help is appreciated, I'm stumped.
If you are not using a framework, such as Bootstrap, then you would have to use CSS's media queries which would allow you to use specific CSS properties depending on the size of the screen of your output device. You can read a clear explanation, at the Mozilla Developer Network, here.
Learning to use them it's not a bad idea, but the most popular means to implement responsive design is using Twitter Bootstrap. Of course you would have to read a lot, but there are a lot of tutorials on how to use the framework and once you are familiar with the grid system and some of it's classes you can make your site responsive quite easily.
The official Bootstrap site and documentation can be found here.
Personally I would suggest you to use Bootstrap since it offers so much functionality without having to make everything from the ground.
This Link may be useful for what you are looking for.
https://spin.atomicobject.com/2015/03/06/bootstrap-add-xl-grid-size-option/
You may use this technique for your need
I am new at html and css and when I increase my browser size my entire layout gets messed up and elements start overlapping one another. Can anyone show me a way to make my layout become responsive? Thank you in advance!
It depends on what you wanna do.
1) If you're learning HTML5 and CSS than you've got to watch towards bootstrap media queries to code fully responsive. To go further you will also need Javascript. There are also paying technologies.
2) If you just wanna make a responsive website without caring about the coding side, you should choose a CMS like Wordpress, Joomla etc... It will be faster for you and with a good responsive template, a very decent solution.
There is a nice tutorial in w3schools that uses we3.css stylesheet framework, very easy to start and see the entire problem. It uses images of different size and adpat itself to pc, tablets, smarthpones. Try it, I mean read, it is a short one, and will help you a lot, can you implement without adding that file, but changing easily yours.
I just tested few of my webpages in cross browsers testing tool and found out that for lower resolutions all my divs were not coming separately.
Afters googling I found out about responsive griding.
After reading that I wanted to ask that whether responsive griding is nothing but making your web page responsive to different changes in screen sizes or does it have anything more to it
Also I am using purecss to make my web page responsive so I needed to know whether this is the right way or and what other ways are there to do this.
Pretty much, it's also about curtailing content based on your audience. Say that people on mobile don't need to read all the reviews on the page you would hide it or show it in a different way. Whether or not to use pure is completely your personal preference. There are a gargantuan amount of responsive frameworks, you should look at what they offer to your own goals of customization or extensibility. Foundation for example offers lovely JavaScript addons you can use for modals, sliders and navigation.
Good luck and please add to your question if you need to ask more!
Your choice to use pure I feel is a good one because its extremely light weight and style agnostic. While bootstrap and foundation are more popular choices they can be up to 10 to 20 times larger.
Check out TukTuk as well, its similar in nature to Pure:
http://tuktuk.tapquo.com/
Yes, you've got the right idea. You can use frameworks like Twitter Bootstrap, or Zurb Foundation, which have all the CSS you need for responsive grids. The basic idea is using CSS media queries to apply different CSS rules for different screen sizes. Javascript can also be used to show/hide features which might work better on mobile.
Does anyone know how to accomplish a different layout based on the browser width, like these two sites?
http://sasquatchfestival.com/
http://css-tricks.com/
I've tried to Google it, look through Stackoverflow questions, and look at their code but I think I am missing something. It actually rearranges and resizes some elements based on the width of the window, but how? Javascript?
Sorry if my search skills are just failing, but I'm not really sure what to look up, the "similar questions" here don't seem related, and even CSS-Tricks doesn't have the info in an easy to find place.
You don't need to use JS to detect browser width. You can simply use CSS media queries to alter the layout.
For example:
#media screen and (max-width: 1280px) {
... selector(s) here ...
}
Will apply CSS only to screens that are at most 1280px wide.
See also:
http://www.w3.org/TR/css3-mediaqueries/
http://reference.sitepoint.com/css/mediaqueries
You can use CSS3 media queries to deliver different styles based on the screen width. See here for more info: http://www.css3.info/preview/media-queries/
If you look at the CSS source of the sasquatchfestival.com site, for example, you can see what they're doing: http://sasquatchfestival.com/css/screen.css?v=1328828795. Search for "#media only screen" and you'll see they're delivering different CSS for widths below 768px, between 768-1024px, and above 1024px.
You can reinvent the wheel or merely build/rebuild your web site using one of the many responsive frameworks that are available. I have used both 'Skeleton' and 'Bootstrap by Twitter' Their frameworks can be found at...
Skeleton... [http://www.getskeleton.com/][1]
Bootstrap... [http://twitter.github.com/bootstrap/][2]
I have built sites using each...
Skeleton... [http://72t.net][3]
Bootstrap... [http://ReactiveWebDesign.net][4]
I'm still trying to decide which I prefer, but right now boot strap seems to offer more features.
May be a little bit of jMasonry in there, but it also looks a little like what Twitter Bootstrap provides in rails, it might be worth pouring over their static CSS version for answers.
I've never done this before. The website I have just built is the second one I have ever built. There is a main container div and a header. I noticed that this simple html/css and js site looks terrible on mobile devices.
When it comes to making the site fluid are there any rules or approaches to make it quick and easy? If I just start changing all set pixel widths to percentages will the elements lose thir alignment in relation to each other? For example, the image in the main image slider is aligned, using pixels, based upon the position of the logo in the header.
Before I get started any pointers would be most appreciated. Here is the site: www.hauswoods.com
I would suggest you look into media queries instead, this will allow you to specify CSS related to different screen sizes. Yes, you could change your website to a liquid/fluid layout but with your current content, getting the slider and images to look right will be a headache.
A quick and easy approach would be to use a framework like Bootstrap (http://twitter.github.com/bootstrap/)
I'm sure some people would argue that you won't learn if you use that (because it will do a lot for you), but I think you can learn by example.
Bootstrap uses progressive enhancement principles to improve UIs and uses something called 'Less' for making CSS a bit more generic (at the expense of some complexity). Still, you can use whichever bits you like from it. If you've got a greenfield site it's a good place to start. It supports fluid layouts and explains to you how your design will degrade on mobile devices with smaller screens.
There are plenty of good tutorials out there:
http://green-beast.com/blog/?p=199
http://www.maxdesign.com.au/articles/liquid/
http://css-tricks.com/the-perfect-fluid-width-layout/
Below are IMHO some of the best JS-frameworks/html5-templaters that help with what you're trying to achieve. No need to re-invent the wheel.
Twitter Bootstrap
Foundation
CreateJS
Skeleton
HTML5 Boilerplate
HTML KickStart
Montage HTML5 Framework
SproutCore
Zebra
if you want your website to be fluid just use percentage instead of pixels.
.classname{
width: 80%;
}