+ 1
Why the style is not applied to an individual element of the class? CSS
why the style is not applied to an individual element of the class, but everything is in order with the rest. Checked no thoughts.
11 Answers
+ 3
Can we see your code?
+ 1
Becouse your link to css style file was written twice (css.css and style.css). Where is situaded this file?
+ 1
to avoid confusion, use while learning or only external styles (in the file), or only internal (setting them in the opening tag of each element)
+ 1
Use for one element style id
http://htmlbook.ru/html/attr/id
+ 1
Good, then delete this line:
<link rel="stylesheet" href="css/style.css">
+ 1
And if your css.css is situated near html file (not in included folder css), write:
<link rel="stylesheet" href="css.css">
0
Yeah, you can: <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/css.css" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<title>ΠΠΈΡΡ ΡΠ°ΡΠ»ΠΈΠ²ΠΎ</title>
</head>
<body>
<div class="overlay">
<nav class="overlayMenu">
<ul role="menu">
<li><a href="index.html" role="menuitem">Main</a></li>
<li><a href="LiveHappy.html" role="menuitem">Live happy</a></li>
<li><a href="#" role="menuitem">#</a></li>
<li><a href="#" role="menuitem">#</a></li>
<li><a href="#" role="menuitem">#</a></li>
</ul>
</nav>
</div>
<div class="navBurger" role="navigation" id="navToggle"></div>
<div id="indent">
<h1>ΠΠ°ΠΊ ΠΏΡΠΎΠΆΠΈΡΡ ΠΆΠΈΠ·Π½Ρ ΡΠ°ΡΠ»ΠΈΠ²ΠΎ?</h1>
<h2>ΠΡΠΈΠ½ΠΈΠΌΠ°ΠΉ Π½Π°ΡΡΠΎΡΡΠ΅Π΅</h2>
<ul class="text">
<li>ΠΠΈΡΡ ΡΠ΅ΠΉΡΠ°Ρ. ΠΠ°ΡΠ»Π°ΠΆΠ΄Π°ΡΡΡΡ Π΄Π°ΡΠΎΠΌ Π½Π°ΡΡΠΎΡΠ΅ΡΠ΅Π³ΠΎ </li>
<li>ΠΠΈΠΊΠΎΠ³Π΄Π° Π½Π΅ ΠΏΡΠΈΠ½ΠΎΡΠΈΡ ΡΡΠ°ΡΡΡΠ΅ Π² ΠΆΠ΅ΡΡΠ²Ρ Π΄ΠΎΡΡΠΈΠΆΠ΅Π½ΠΈΡΠΌ </li>
<li>ΠΠ°ΡΠ»Π°ΠΆΠ΄Π°ΡΡΡΡ Π΄ΠΎΡΠΎΠ³ΠΎΠΉ ΠΈ ΠΏΡΠΎΠΆΠΈΠ²Π°ΡΡ ΠΊΠ°ΠΆΠ΄ΡΠΉ Π΄Π΅Π½Ρ ΠΊ
0
body{
background-color: #C9FFBF;
margin: 50;
padding: 25;
}
A {
text-decoration: none;
}
.mainHead{
font-size: 60px;
text-align: center;
background-color: red;
display: inline-block;
margin-left: 25%;
margin-right: 25%;
}
.h2rules{
text-align: center;
font-size: 35px;
}
.text{
font-size: 25px;
}
footer{
text-align: center;
background-color: silver;
}
h1{
text-align: center;
font-size: 45px;
}
#indent{
margin-left: 15%;
margin-right: 15%;
}
0
just look that in the class the text does not change the size of the text in all elements
0
so the problem is that the font size is applied to all elements of the "text" class, but not to 1 of them.
0
Itβs located in the same folder as CSS.css, but I just didnβt drop it to you, since it is intended for the menu.