I noticed that when I’m building the tribute page, there’s 2 different boxes to write the index.html and style.css
do i have to use the 2 boxes separately? i.e. can i not write my html and css code in the same box?
it’s a bit confusing to me to use two separate boxes
You need to use the two separate boxes. This is meant to act as documents. The .html acts as a HTML file whereas the .css acts as a CSS file. Understanding how to utilize them is beneficial when you take projects away from FCC and begin to make your own files and link them together. Also, having them in separate files is easier to read.
Okay thank you!
I didn’t like the sizing of my image which i added in the html box
so I added “width: 100%” in the image code and it has resized the image
…but is this “width:100%” supposed to go into the CSS box? i’m aware that it’s not using the CSS style property… is it still classified as CSS? (sorry if it sounds like a very stupid question, i’m very new to all of this!)
There are no dumb questions.
It is all part of the learning process
Yes, that would be considered a CSS property. If you have more than one image you can give the image you want to resize an id attribute and then use a CSS selector to adjust the width of the given id.
Thanks for the clarification!
I only have 1 image, is there a more recommended way rather than using ID attribute?
Not that I can think of although I am kind of new to all of this myself and someone like @jwilkins.oboe may be able to provide more information.
In this case since it is just one image, then using an id is fine.
It makes it easier to use a class to style several images in the same way instead of using a whole bunch of ids.
If you have multiple things such as images that you wish to style in the same manner then using classes makes sense. However, if it is just one you wish to style would an id be the appropriate styling selector or should you still use class.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.