A portfolio website designed to be sold on ThemeForest - (Update style.css) Part 8

Let's update the `styles.css` file to include styles for the `contact.html` page, ensuring it fits with the existing theme and maintains consistency across all pages.

### Updated CSS (styles.css)


```css

/* General Styles */

body {

    font-family: Arial, sans-serif;

    margin: 0;

    padding: 0;

    box-sizing: border-box;

    line-height: 1.6;

    background-color: #f8f9fa;

    color: #333;

}


.container {

    width: 90%;

    margin: 0 auto;

}


/* Navbar Styles */

.navbar {

    background: #333;

    color: #fff;

    padding: 1rem 0;

}


.navbar .container {

    display: flex;

    justify-content: space-between;

    align-items: center;

}


.nav-menu {

    list-style: none;

    display: flex;

}


.nav-menu li {

    margin-left: 2rem;

}


.nav-menu a {

    color: #fff;

    text-decoration: none;

    font-weight: bold;

}


/* Section Title Styles */

.section-title {

    text-align: center;

    margin-bottom: 3rem;

    font-size: 2.5rem;

    color: #333;

}


/* Contact Section Styles */

.contact-section {

    padding: 4rem 0;

    background: #fff;

    text-align: center;

}


.contact-form {

    max-width: 600px;

    margin: 0 auto;

    padding: 2rem;

    background: #f4f4f4;

    border-radius: 5px;

    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);

}


.form-group {

    margin-bottom: 1.5rem;

    text-align: left;

}


.form-group label {

    display: block;

    margin-bottom: 0.5rem;

    font-weight: bold;

    color: #333;

}


.form-group input[type="text"],

.form-group input[type="email"],

.form-group textarea {

    width: 100%;

    padding: 0.75rem;

    font-size: 1rem;

    border: 1px solid #ccc;

    border-radius: 3px;

    transition: border-color 0.3s ease;

}


.form-group input[type="text"]:focus,

.form-group input[type="email"]:focus,

.form-group textarea:focus {

    outline: none;

    border-color: #66afe9;

}


.form-group textarea {

    resize: vertical;

}


.btn {

    display: inline-block;

    padding: 1rem 2rem;

    background: #ff6347;

    color: #fff;

    border: none;

    border-radius: 5px;

    text-decoration: none;

    font-size: 1rem;

    cursor: pointer;

    transition: background 0.3s ease;

}


.btn:hover {

    background: #e65100;

}


/* Footer Styles */

.footer {

    background: #333;

    color: #fff;

    padding: 1rem 0;

    text-align: center;

}


.footer p {

    margin: 0;

}


.social-links {

    list-style: none;

    padding: 0;

    display: flex;

    justify-content: center;

    gap: 1rem;

}


.social-links li {

    margin: 0;

}


.social-links a img {

    width: 24px;

    height: 24px;

    transition: transform 0.3s ease;

}


.social-links a img:hover {

    transform: scale(1.2);

}

```


### Explanation:


1. **General Styles**: Updated `body` background color and text color for better readability on light backgrounds (`#f8f9fa` for background and `#333` for text).


2. **Navbar Styles**: Styles remain consistent with dark background (`#333`) and white text (`#fff`).


3. **Section Title Styles**: `.section-title` styles ensure consistent appearance of section titles across all pages with centered alignment, appropriate margin, and font size.


4. **Contact Section Styles**: 

   - `.contact-section` has a white background (`#fff`) and is centered (`text-align: center`).

   - `.contact-form` is styled with a light gray background (`#f4f4f4`), padding, border-radius, and box-shadow for a clean form appearance.

   - `.form-group` styles ensure input fields and text areas are full-width, styled with padding, border, and transition effects for user interaction.

   - `.btn` class styles the submit button with a contrasting color scheme, padding, border-radius, and hover effect (`background` transition).


5. **Footer Styles**: 

   - `.footer` maintains a dark background (`#333`) with white text (`#fff`) and central alignment.

   - `.social-links` aligns social media icons (`img`) horizontally with a gap (`gap: 1rem`) and hover effect (`transform: scale(1.2)`).


### Integration:


- Ensure `styles.css` is linked correctly in all HTML pages (`<link rel="stylesheet" href="styles.css">`).

- Replace placeholder content (`Your Name`, `Your Email`, `Message`, `Send Message`, social media icons) with actual content relevant to your contact form and social media profiles.


By updating `styles.css` with these styles, you maintain a cohesive design across all pages of your portfolio theme, enhancing user experience and visual appeal. Adjustments can be made based on your specific design preferences and requirements.

Post a Comment (0)
Previous Post Next Post