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

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

7 Replies
Ground Controller Lvl 1
Message 2 of 8

Re: HTML and CSS connecting

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

Solution
Pilot Lvl 3
Message 3 of 8

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".

 

Copilot Lvl 3
Message 4 of 8

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 8

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 8

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 8

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 8

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