on this task of “Height and Width” it asks you to add height: 700px; into CSS however I am confused why it changes the size of the image rather than the text inside the
because the banner takes care of the entire space, including the image. if you would want to change the actual text, then you would have to go to #banner .content h1. (because h1 is the text) and change the size there
That much specificity is not required. Ideally we should work with the least specificity possible so upgrades and mods are simpler. If there is only one H1 in the page, or in the case of there being more than one if you want them all the same size then,
body {
font-size: 100%;
}
h1 {
font-size: 1.5rem;
}
The first rule above is to accept the base font size set by the user. Then the H1 is relative to that. A default H1 is 2rem (about 32px).
i get my paragraph aligned to the left when i make it width:30 px;. but when i make it 350 (which is a lot more) i get it normally as a paragraph . how come?
on this task of “Height and Width” it asks you to add height: 700px; into CSS however I am confused why it changes the size of the image rather than the text ? I cleared everything in style.css and wrote new codes, and it still didnt change. please help!!!
Again, I can barely read the text on the sample website. The contrast between the text and the background is minimal. If it’s just another website out there, I wouldn’t care and just not go back to that website.
But since this is set as an example for the Codecademy learner, I think the instructor should use user a better example (or just make the text a few shares darker). I am a girl, and I do think it looks pretty and all. But functionality should trump appearance, especially in this case. If I can’t read the text, I won’t care how pretty the site looks.
Just to confirm with this topic, when you set the height or width of an element, you’re setting the element’s CONTENT area, not the total height or width of the element itself ???
Now the text has been crammed into a narrower space. Note that the letters themselves did not change size. To effect this, use the property font-size: followed by the value in px, em, rem, etc.
The lesson tells us that if we set the width/height in px, what will fill a laptop screen would overflow a mobile device screen. That leads me to believe that it really isn’t the ideal way to do it. Now that most people do the majority of their web browsing on a mobile device, is there something that allows you to code for all size screens? A one size fits all type?
Content area. According to the box model, border and margin are outside of this region. Padding is, however, inside and will have possibly undesired effects, hence I suggest caution or total avoidance.