html, body, h1, h2, h3, h4, p, a, ul, li, div, main, header, section, footer, img {…
- User
html, body, h1, h2, h3, h4, p, a, ul, li, div, main, header, section, footer, img { margin: 0; padding: 0; border: 0; font-size: 100%; font-family: inherit; vertical-align: baseline; box-sizing: border-box; }
body { font-family: "Cabin", sans-serif; line-height: 1.5; color: #333; width: 100%; margin: 0; padding: 0; min-height: 100vh; flex-direction: column; display: flex; background-image: url("../assets/images/cover.jpg"); background-size: cover; } header { background: #00000000; padding: 0.5rem 2rem; text-align: center; color: #32612D; font-size: 1.2rem; } main{ flex-grow: 1; }
.sticky-nav { position: -webkit-sticky; position: sticky; top: 0; z-index: 1000; }
.nav-container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; } .search-container { display: inline-block; position: relative; }
.search-container input[type="text"] { padding: 0.8rem; border: none; border-bottom: 1.5px solid #32612D; outline: none; color: #32612D; font-size: 1rem; background-color: transparent; margin-right: 30rem; margin-bottom: 12px; width: 65%; }
.search-container input[type="text"]::placeholder { color: #32612D; opacity: 0.5; } .search-icon { margin-right: 0.8rem; width: 24px; height: auto; vertical-align: middle; position: absolute; top: 50%; margin-top: -16px;
}
.search-container input[type="text"]:focus { border-color: #ADC3AB; }
.search-container button[type="submit"] { display: none; } .logo { width: 50px; height: auto; margin-right: 1rem; }
h1 { flex-grow: 1; text-align: left; }
nav ul { display: inline
list-style: none; }
nav ul li { display: inline; margin-left: 1rem; }
nav ul li a { text-decoration: none; color: #32612D; position: relative; transition: color 0.3s ease; }
@media screen and (max-width: 768px) { .nav-container { flex-direction: column; } h1 { margin-bottom: 1rem; } } nav ul li a { text-decoration: none; color: #32612D; position: relative; transition: color 0.3s ease; }
nav ul li a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background-color: #000; transform: scaleX(0); transition: transform 0.3s; } nav ul li a:hover { color: #000000; } nav ul li a:hover::after { transform: scaleX(1); }
.slideshow-container { width: 100%; position: relative; margin: 1rem 0; }
.mySlides { display: none; }
.mySlides img { width: 100%; height: auto; }
/* Slideshow navigation */ .prev, .next { cursor: pointer; position: absolute; top: 50%; width: auto; margin-top: -22px; padding: 16px; color: #32612D; font-weight: bold; font-size: 18px; transition: 0.6s ease; border-radius: 0 3px 3px 0; user-select: none; }
.next { right: 0; border-radius: 3px 0 0 3px; }
.prev:hover, .next:hover { background-color: rgba(255,255,255,0.8); }
- Assistant
This CSS code contains styles for various elements within an HTML document, including the body, header, main, navigation, catalog, footer, and more. It also contains media queries for different screen sizes, such as screens with a maximum width of 768 pixels and 480 pixels.
The styles include font settings, colors, margins, paddings, alignments, and more to provide a consistent and visually appealing layout for an online store or promotional webpage.
For example, the body has a background image, a sticky navigation bar is defined, a slideshow container with animation is included for image slideshows, catalog-item styling gives a clean product listing layout and buttons, including those inside modals, have uniform styling.
The responsiveness of the design is achieved through media queries that change the layout and styles when viewed on devices with smaller screen sizes.