HtmlCss First attempt and try project

Please find my project at the following url : , thank you to help me to improve this exercise. There are a lot of ‘mistakes’, for instance, I do not understand why the background image does not appear. Many thanks for your comments and help. Tedj

Hey tedjcoding
I cannot find the code, did you make it public?

Hi usernamegiapreso,
Yes I did. But … As this is my first time practicing both Html + CSS and Github, I may have made a mistake in pushing Github. Please be patient, I will redo the whole procedure.

Hi usernamegiapreso,
here you go. I changed the repository name, it is as follow :frowning:GitHub - tedjngit/prjfruits)

Sorry, the complete address is as follow : (GitHub - tedjngit/prjfruits)

Please confirm if you have find the code.
Thanking you in advavnce,

Hi @tedjcoding I can see the files now in the repo, however the index.html is empty.

However if you want to post the code directly in here it would facilitate me to help you. In this case please write three backticks ``` before and after the code block in order to style formatting it and making it more visible.

Cheers :slight_smile:

Hi, here you go :

<html lang="en">

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale1.0">
    <meta http-equiv="X-UA-Compatible" content="ie-edge">
        Turnover Co. tablify
    <link rel="stylesheet" href="./resources/css/style.css">
    <link rel="preconnect" href="">
    <link href="" rel="stylesheet">

        <banner id="coadr">

            <h1>Fruits & Vegetables</h1>
            <p>105, Almond street</p>
            <p>31861, Bogota</p>
            <p>G.D. Luxembourg</p>

    <p id="titr">Annual sales report


                <td>250 000 €</td>
                <td>65 000 €</td>
                <td>234 000 €</td>

                <td>476 254 €</td>
                <td>215 000 €</td>
                <td>838 500 €</td>

                <td>25 000 €</td>
                <td>802 672 €</td>
                <td>343 890 €</td>


                <td>150 346 $</td>
                <td>315 000 $</td>
                <td>421 874 $</td>


                <td>281 829 $</td>
                <td>430 000 $</td>
                <td>138 450 $</td>


                <th>Total €</th>
                <td>2.5 M</td>
                <td>1.8 M</td>
                <td>3.2 M</td>
                <th>Total $</th>
                <td>1.6 M </td>
                <td>4.2 M</td>
                <td>6.3 M </td>

</html> ``` 
Please confirm you got it.

Please correct the line 1igne 11 as follow :
<link rel="stylesheet" href="style.css">

Ok, I should have specified to post just the relative piece of code. :stuck_out_tongue: However, this is your code, correct?

        <banner id="coadr">

            <h1>Fruits & Vegetables</h1>
            <p>105, Almond street</p>
            <p>31861, Bogota</p>
            <p>G.D. Luxembourg</p>



#coadr {
    height: 350px;
    width: 100%;
    font-family: monospace;
    font-size: 15px;
    background-image: url("fruits1.jpg");

And you want to know why does the background image fruits1.jpg doesn’t not fill the background of the html tag with id attribute coadr, yes?

The answer is that the html tag that you use <banner></banner> is not recognized by the browser as a valid html tag. If you change that to a <div> element, for example, you’re going to be able to see the background image.

Does this help solve your issue? :slight_smile:

1 Like

Yes, thank you very much, now it is better, I can see the image, but the image is repeated 2.5 times, what can be the reason? should the size be enlarged?

When using background property the default is to repeat it to cover the whole background container size.
So if you just want one image you can use the rule:

background-repeat: no-repeat;

As you can see I also used that in the screenshot I posted.
If you want to also adapt the position of the background image inside the container you can use the rule:


Also the rule to manipulate its size could come in handy:


To learn more about this rules check out this MDN page about CSS background.
f this solves your issue, please mark it so. Thanks :slight_smile:

1 Like

If anyone have Codeacademy Pro access please :pray: provide me on this email

thank you very much, I quickly consulted the MDN page, it deserves to consult it more in depth.
Keep in touch. Regards, Tedj

Is it what you are expecting?

1 Like