I cannot figure out how to extend the borders on my index to the left side of the viewport. It seems like margin-left: should do it, but there is no effect.
Why is there a white border around the body of my page?
Your code so far
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36.
yes, the green border. I am working on it now, and added negative margin to the left side. This seems to have worked but Im left feeling there is a cleaner way.
also, margin: 0; doesnt have an effect. presumably because ive complicated it somehow.
btw, where do you get the “filler text”? Its probably a better option than mashing the keyboard like in my project.
edit: I have another question. how do you add line breaks within the “code” element? in freecodecamps example, “code” seems to adhere to their line breaks but mine displays a straight line
The short answer is find a page that has code displayed how you like and use DevTools to peek at their solution
Generally you use the <pre> and the <code> tags together. The pre tag has lots of css style options to help you dial in what you want to display. Seek out a current online article or tutorial on this.
There are also some cool javascript libraries available to give you detailed control over how your code displays and highlight syntax just like in an editor. https://prismjs.com/