-1

Media Queries for HTMl Elements. For example :

.container(min-width: 500px)
 {
  .wid-sm {width: 200px;}
 }

I want to make the element responsive like Media Queries. kindly provide me the solution.

davidkonrad
  • 83,997
  • 17
  • 205
  • 265
  • Asked and answered more than once. http://stackoverflow.com/questions/12251750/can-media-queries-resize-based-on-a-div-element-instead-of-the-screen –  Oct 31 '14 at 11:51

1 Answers1

0

You can specify the css for different resolution like this:

@media (max-width: 600px) {

   .wid-sm {width: 200px;}

}
@media (min-width: 600px and max-width: 800) {

   .wid-sm {width: 350px;}

}
Domain
  • 11,562
  • 3
  • 23
  • 44
  • This is not the question. –  Oct 31 '14 at 11:50
  • First you want to get the container size then accordingly resize the wid-sm div. Is this what you want? – Domain Oct 31 '14 at 11:55
  • 1
    He wants to specify a media query-*like* rule, but basing it on the size of an element rather than on the size of the screen, a feature which of course is not in CSS. –  Oct 31 '14 at 11:58