Certainly! Here is a CSS script that styles a webpage with a dark background and a responsive layout:
/* Global Styles */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Arial, sans-serif;
font-size: 16px;
line-height: 1.5;
color: #fff;
background-color: #333;
overflow-x: hidden;
overflow-y: auto;
}
a {
text-decoration: none;
color: #fff;
}
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
color: #fff;
margin-bottom: 10px;
}
p {
margin-bottom: 20px;
}
/* Responsive Styles */
@media (max-width: 768px) {
body {
font-size: 14px;
}
h1, h2, h3, h4, h5, h6 {
font-size: 18px;
}
.container {
max-width: 100%;
}
}
@media (max-width: 480px) {
body {
font-size: 12px;
}
h1, h2, h3, h4, h5, h6 {
font-size: 16px;
}
.container {
max-width: 100%;
}
}
/* Container Styles */
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
background-color: #333;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* Header Styles */
.header {
background-color: #333;
padding: 20px;
text-align: center;
}
.header-logo {
font-size: 24px;
font-weight: bold;
color: #fff;
margin-bottom: 10px;
}
/* Footer Styles */
.footer {
background-color: #333;
padding: 20px;
text-align: center;
position: relative;
}
.footer-copyright {
font-size: 12px;
color: #fff;
bottom: 0;
left: 0;
width: 100%;
text-align: center;
position: absolute;
}
This CSS script includes global styles for the body and links, responsive styles for different screen sizes, and container, header, and footer styles. You can adjust the values to fit your preferences.
To use this script, save it in a file with a .css extension and link it to your HTML file using the <link> tag:
<head>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
You can also paste the CSS code directly into the <style> tag in your HTML file:
<head>
<style>
/* CSS code here */
</style>
</head>
I hope this helps! Let me know if you have any questions or need further assistance.