CHAPTERSEVEN
Be focused and you will archive alot. choose your ON CSS
Explore moreBe focused and you will archive alot. choose your ON CSS
Explore moreLorem ipsum dolor sit amet consectetur adipisicing elit. Hic odit rem dolorum molestiae fugit deserunt exercitationem recusandae, itaque ratione harum sit repellat dolor temporibus deleniti non voluptatem nostrum quas? Cumque veniam, molestias id natus pariatur dolores aut nemo iure facilis expedita, temporibus exercitationem ullam ex officiis reiciendis quaerat enim consequuntur.
here are the structured upcoming chapters to cover essential advanced concepts with practical examples.
up coming
up coming
up coming
Targets elements of a specific type within a parent.
Example:
/*CSS CODE */
p:nth-of-type(2) {
color: blue;
}
* The second <p> inside the same parent is colored blue.
Example:
/*CSS CODE */
p:not(.special) {
color: red;
}
<!-- html code -->
<p>This paragraph is red.</p>
<p class="special">This paragraph is NOT red.</p>
Any <p> without class special turns red.
Example:
CSS CODE
div:has(img) {
border: 2px solid green;
}
HTML CODE
<div>
<img src="image.jpg" alt="Inside div">
</div>
<div>No image here.</div>
* Only <div> containing an <img> gets a green border.
<!DOCTYPE html> <html> <head> <title>Title of thePage</title> <style> /* Highlight all input fields except checkboxes */ input:not([type="checkbox"]) { background-color: lightblue; } table tr:nth-child(even) { background-color: lightgray; } </style> </head> <body> <input type="text" placeholder="This turns blue"> <input type="password" placeholder="This turns blue"> <input type="checkbox"> Checkbox <table> <tr> <td>Row 1</td> </tr> <tr> <td>Row 2</td> </tr> <tr> <td>Row 3</td> </tr> <tr> <td>Row 4</td> </tr> </table> </body> </html>
Row 1 |
Row 2 |
Row 3 |
Row 4 |
In today’s world, people browse websites on different screen sizes—from
desktops and tablets to smartphones and even smart TVs. If a website isnot
responsive, it may look great on a laptop but appear broken or unreadable on a
phone.
Responsive Design ensures that a webpage adapts to different screen sizes
without breaking. This is achieved using:
* Fluid layouts (flexible widths instead of fixed pixels)
* Flexible images (images that resize automatically)
* CSS Media Queries (to apply styles based on screen size)
@media (max-width: 768px) {
body { background-color: lightblue; }
}
/* Extra small devices (phones) */
@media (max-width: 480px) {
body {
background-color: yellow;
}
}
/* Small devices (tablets) */
@media (max-width: 768px) {
body {
background-color: lightblue;
}
}
/* Medium devices (laptops) */
@media (max-width: 1024px) {
body { background-color: lightgreen;
}
}
/* Large devices (desktops) */
@media (max-width: 1200px) {
body {
background-color:orange;
}
}
/* Portrait mode */
@media (orientation: portrait) {
body { background-color: pink;
}
}
/* Landscape mode */
@media (orientation: landscape) {
body {
background-color: skyblue;
}
}
@media (min-width: 600px) and (max-width: 1200px) {
body { font-size: 18px; }
}
img {
max-width: 100%;
height: auto;
}
<!DOCTYPE html> <html> <head> <title>Title of thePage</title> <style> /* Hide menu on small screens */ @media (max-width: 768px) { nav ul { display: none; } .menu-icon { display: block; cursor: pointer; } } </style> </head> <body> <nav> <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact</a></li> </ul> <div class="menu-icon">☰</div> </nav> </body> </html>
vildash network team has had alot of impact on others but here are the vildash network team testimonies and expirience while working with the team
you can now connect and text other users from our database. you just neeed to click bellow to message them
WE HAVE CODE EDITORS FOR LANGUAGES LIKE C, C#, C++, HTML, CSS, javascript, JAVA VISUAL BASIC
We dont just teach you to code we teach you to code and build amazing systems.we are group of expert who wants to promote our field of studies