Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 1 of 9

HTML and CSS connecting

Solved! Go to Solution.

Hi.

I am new in Gethub.

I saw that there are posts about CSS and HTML problemas, but I do not find the answer I am looking for.

I have a web page and CSS is not applied to html. When I made the smaller CSS I applied it. Can you explain the mistake I have? I did the validation of w3c but it says it is correct.

I attach 2 files: HTML and CSS.

Thanks.gethubhtml.JPGgethubcss.JPG

8 Replies
Ground Controller Lvl 1
Message 2 of 9

Re: HTML and CSS connecting

make sure u have put your css code in the proper places in the <head> of your document..

Solution
Commander Lvl 1
Message 3 of 9

Re: HTML and CSS connecting

You've mixed up classes and ids in your css.

 

E.g. if "navbar" is a class as shown in the HTML, then the CSS should read ".navbar", not "#navbar".

 

Please follow-up to let us know how you made out. For good karma, mark a reply as the answer if it helped!

Copilot Lvl 3
Message 4 of 9

Re: HTML and CSS connecting

Hi. Thanks for your answer, but I applied your recommendations and the css still does not apply to html. The verification of w3c says that the code is correct. Can you help me, please?

I attach html and css new files.gethub12-3.JPGgethubhtml3-12.JPG

Copilot Lvl 2
Message 5 of 9

Re: HTML and CSS connecting

7 <link rel=”stylesheet” type=”text/css” href=”Mystyles.css media=”screen”/>
te sobra la barra que tienes antes de Mystyles.css

Copilot Lvl 2
Message 6 of 9

Re: HTML and CSS connecting

8 <link rel=”stylesheet” type=”text/css” href=”Mystyles.css media=”screen”/>
te sobra la barra que tienes antes de Mystyles.css

Copilot Lvl 3
Message 7 of 9

Re: HTML and CSS connecting

Gracias, pero antes de Mystyle.css no hay barra, hay comillas. Te refieres a eso?

Por otra parte, si sólo tengo un archivo css que es colores.css debo poner todo ese link diciendo Mystyles.css (lo copié de un tutorial) o es justamente donde debo reemplazar por mi archivo css?

Copilot Lvl 2
Message 8 of 9

Re: HTML and CSS connecting

prueba si consigues que funcione, sin la barra, de todos modos, creo que lo que tines que hacer es realizar un enlace con el css original que has de tener puesto en tu ordenador y dentro de la carpeta en la que tienes almacenado el programa, no se bien lo que has hecho, pero es lo que necesitas, a parte de que en css al comienzo de alguna haccion no lleva barras invertidas.

un saludo

Community Manager
Message 9 of 9

Re: HTML and CSS connecting

Hey @naturaleza106,

Thanks a lot for being here! At this time we don’t have moderators to support a different language than English. I see this thread has been very informative and helpful to all and will ask you to please resume the conversation in English. Thanks again for taking the time to contribute, we look forward to seeing you around!

Best,

Andrea
Thanks for being here, sharing, and keeping our community awesome!
Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!