Can I create html tags based on screen sizes?

I looked at some of my codes in Safari when I resized the page and it didn't look very good. I need to restore it and with the media tag I added another stylesheet. It looks better now, but there are still some aspects of the page that don't look good that I can easily fix with html. When I add html the page starts to look better, but then when I make a full browser page it looks weird. Is there a way to make the html tag work based on the screen size? I'm looking for something like the "media" tag used when linking a stylesheet. I also have JavaScript and jQuery on my site if that helps, but what is it.

+3


source to share


2 answers


you can use this

 @media

      

For example, it will only be 500px wide or higher



@media (min-width:500px)
{
    /*Class name*/
    {
      /*properties*/
    }
}

      

similarly you can specify a max width, but to save time you should use the popular jQuery compatible bootstrap framework

+1


source


if you want this html tag to work based on screen size you need to work with responsive css or you can use any framework like bootstrap or framework even more accessible for html and css where you can get the html visibility classes for you



0


source







All Articles