Home > Software engineering >  Is there an easy way to make a relly old web page, that has hard coded values and used a lot of tabl
Is there an easy way to make a relly old web page, that has hard coded values and used a lot of tabl

Time:06-20

As the title says pretty much. I have a lot of hard coded widths and the whole thing is using tables to position the items. Is there an easier way to make it mobile friendly, other than going trough the whole code changing things? Preferably with just css, no javascript.

CodePudding user response:

Yes. You can do it by using media queries.

CodePudding user response:

sure, With css media queries you can re-style all the table/tr/th/td elements.

if you want a short example. try just to apply this style to your website

<style type="text/css">
    @media screen and (max-width: 800px) {
       tr {
          display: flex;
          flex-wrap: wrap;
       }
    }
</style>

And reducing the windows, you'll see that all rows will become flexible

  • Related