Responsive @media-queries setup for template Blogger

1.6k views Asked by At

Use default Blogger template, named Simple. That because let me edit more template. But responsive design is poor. Only on mobile small screen the text can be readable easy. I tried to add media-queries, but I'm not experience in CSS. Below you have code that I tried apply, but unsuccessfully.

EDIT:

We have succeeded add some code that works pretty well. I need your help to improve code already published by me, but also to add sidebar to adjust or may not display.

For sidebar, class was that: fauxcolumn.

My template code is here: http://hostcode.sourceforge.net/view/3075

/**************************************************************************/
/*********************RESPONSIVE MEDIA-QUERIES*****************************/
/**************************************************************************/
 
/* Laptops and Desktops */
@media (min-width : 1025px) and (max-width : 1280px) {
/* The following css will be rendered if device width is less than 1280px */
 
}
 
/* Tablets (Landscape) */
@media (min-width : 769px) and (max-width : 1024px) {
/* The following css will be rendered if device width is less than 1024px */
 
body {
   position: relative;
  aling:center;
  margin: 0 0px 0 -25% !important;
  width: auto;
  text-align: left;
  padding-right: 0px;
 
}
 
.post-body {
position: relative;
  margin: 0 0px 0 0px !important;
  width: 75%;
  text-align: left;
  padding-left: 0px;
 
  display: -webkit-flex; /* Safari */
   -webkit-align-items: center; /* Safari 7.0+ */
   display: flex;
}
 
}
 
/* Tablets (Portrait) */
@media (min-width : 641px) and (max-width : 768px) {
/* The following css will be rendered if device width is less than 768px */
body {
   position: relative;
  aling:center;
  margin: 0 0px 0 -35% !important;
  width: auto;
  text-align: left;
  padding-left: 0px;
 
}
 
.post-body {
position: relative;
  margin: 0 0px 0 25px !important;
  width: 60%;
  text-align: left;
  padding-left: 0px;
 
}
}
 
/* iPhones */
@media (min-width : 481px) and (max-width : 640px) {
/* The following css will be rendered if device width is less than 640xpx */
body {
   position: relative;
  aling:center;
  margin: 0 0px 0 -300px !important;
  width: auto;
  text-align: left;
  padding-left: 0px;
 
}
 
.post-body {
position: relative;
  margin: 0 200px 0 0px !important;
  width: 55%;
  text-align: left;
  padding-left: 0px;
 
}
}
 
/* Mobiles */
@media only screen and (max-width : 480px) {
/* The following css will be rendered if device width is less than 480px */
 
}
 
/* Small Mobiles */
@media only screen and (max-width : 320px) {
/* The following css will be rendered if device width is less than 320px */
 
}
 
/**************************************************************************/
/*****************************END RESPONSIVE*******************************/
/**************************************************************************/

Thanks a lot for any help!

1

There are 1 answers

0
2 Global Nomads On

Blogger has a responsive template called "Contempo" which has media queries already in place. You might want to give it a try. I am using it in my travel blog. The SEO is broken (like in most of the blogger templates), but I fixed those issues as well and you can get the fixes from my GitHub (sorry, no links, you have to dig them out by yourself as some "experts" here are editing posts removing all links).