r/beginnerwebdev • u/xrochester123 • Jun 16 '20
Viewport
Trying to rebuild my website to be responsive using the most basic html possible. I will NEVER understand CSS, Javascript, media queries or anything more than basic html tags unless possibly if they are snippets of code that I can copy and paste into my html document. I've watched a hundred YouTube videos and I've discovered (frustratingly) that computer nerds are utterly incapable of explaining ANYTHING to non-programmers. I'm not looking for a million suggestions on alternative technologies. If what I'm asking is not possible, PLEASE FOR THE LOVE OF GOD, just say so.
Here is the sample page I'm working on.
View all comments
Show parent comment
1
u/[deleted] Jun 16 '20
The viewport tag in your code doesn't do anything outside of setting the entire site to render (look) the right size on mobile devices.
The part of the code that did the thing you wanted is near the top of the file:
<style>body {background: white;}img {width: 100%;}</style>This is some CSS. Here we have two rules:
bodypart tells the browser to make the background of the site the colourwhiteimgpart tells the browser to make every image on the site be 100% of the browser (or viewport) widthWhere your HTML tells the browser what is on the page, CSS describes what the content will look like - this is also known as the style.
I'm afraid I don't do consulting work, but I'm always happy to help those who want to learn for themselves :)