0

I have a website I need to make responsive.

I have a containing div which will be fluid and will have floating divs within the container which cannot change size, but would like them to stay in the center and have equal spacing. Anyone any ideas? They will be in rows of 3 at the beginning and will reduce to two and then one.

.container {width:100%; text-align:center;}
.qitem{display:block;text-align:left;float:left;width:320px; height:300px}
.qitem:nth-child(odd) {margin-right:1%;margin-left:10%;}
.qitem:nth-child(even){margin-right:10%;margin-left:1%;}
Fabrizio Calderan
  • 120,726
  • 26
  • 164
  • 177
LeeTee
  • 6,401
  • 16
  • 79
  • 139

2 Answers2

2

this works nicely

 .qitem{display: inline-block;text-align:left;float:none;width:320px; height:300px}
LeeTee
  • 6,401
  • 16
  • 79
  • 139
-1

If your site is currently online I recommend you to not implement your own solution for such a common problem like responsive design. Use a CSS framework to do the work for you, here are 8 good css framework pick whichever you want:

http://webdesignledger.com/tools/8-useful-responsive-css-frameworks

If using a framework is not an option, take a look at this previous question:

Fastest Way to Make Website Responsive?

Community
  • 1
  • 1
sandino
  • 3,813
  • 1
  • 19
  • 24