Fletcher91 Posted February 15, 2017 Share Posted February 15, 2017 Hi, I have my content in a table set to 800px as i want the content to be quite small in the center of the page (See screenshot) This is the code i am applying to keep it at 800px: <table width="800" style="margin-left: auto; margin-right: auto;"> The problem is, when I view the website on mobile, it is staying at the 800px and bleeding off the side of the page (see screenshot) Is there anything I can add to my line of code to make it scale down when viewed on a screen less than 800px?? Thank you Link to comment Share on other sites More sharing options...
JeredBolton Posted February 15, 2017 Share Posted February 15, 2017 Any reason for using a table element rather than a div? If you add a class to the element rather than inline css you can then add a suitable media query to make the content respond to smaller screen sizes. Link to comment Share on other sites More sharing options...
Fletcher91 Posted February 15, 2017 Author Share Posted February 15, 2017 Aw ok, so if I write something like this: <div style="max-midth:800px"> </div> This will be better? Not really sure if "max-width" will let it scale down below 800px? Thanks for replying again mate lol Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now