+ 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 Respuestas
+ 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.