A portfolio website designed to be sold on ThemeForest - (update styles.css) Part 16

 Let's update the `styles.css` file to include styles for the `contact.html` page. We'll ensure it complements 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-content {

    display: flex;

    justify-content: center;

    align-items: flex-start;

    gap: 4rem;

}


.contact-form {

    max-width: 500px;

    width: 100%;

}


.form-group {

    margin-bottom: 1.5rem;

}


.form-group label {

    display: block;

    margin-bottom: 0.5rem;

    font-weight: bold;

    color: #333;

}


.form-group input,

.form-group textarea {

    width: 100%;

    padding: 0.75rem;

    font-size: 1rem;

    border: 1px solid #ccc;

    border-radius: 5px;

}


.form-group textarea {

    resize: vertical;

}


.btn {

    display: inline-block;

    padding: 0.75rem 1.5rem;

    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;

}


.contact-info {

    max-width: 300px;

    text-align: left;

}


.contact-info h3 {

    font-size: 1.8rem;

    color: #333;

    margin-bottom: 1rem;

}


.contact-info p {

    font-size: 1rem;

    line-height: 1.6;

    color: #555;

}


/* 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**: 

   - `body` styles ensure consistent font-family, margin, padding, box-sizing, line-height, and background color (`#f8f9fa`) for readability.

   - `.container` sets a max-width and centers content horizontally.


2. **Navbar Styles**: 

   - `navbar` styles maintain a consistent look with a 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` styles set padding (`4rem 0`) and a white background (`#fff`) for the contact section.

   - `.contact-content` uses flexbox (`display: flex`) to organize content (`contact-form` and `contact-info`).


5. **Contact Form Styles**: 

   - `.contact-form` styles the form with `max-width: 500px` for readability and `width: 100%`.

   - `.form-group` styles form inputs (`input` and `textarea`) and labels for clarity and usability.

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


6. **Contact Information Styles**: 

   - `.contact-info` styles set `max-width: 300px` for readability and aligns text (`text-align: left`).

   - `.contact-info h3` styles ensure the heading (`h3`) is visually distinct with a larger font size (`1.8rem`) and color (`#333`).

   - `.contact-info p` styles set font size (`1rem`), line height (`1.6`), and color (`#555`) for paragraphs.


7. **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 correctly linked in all HTML pages (`<link rel="stylesheet" href="styles.css">`).

- Replace placeholder content (`Your Name`, `Your Email`, `Your Message`, `Send Message`, `contact@example.com`, `+1 (123) 456-7890`, `123 Main Street, City, Country`) with actual contact information and details.

- Customize the form action (`action="#"`) to point to your backend script or service handling form submissions.


These updated styles for `styles.css` will ensure your `contact.html` page fits seamlessly into your portfolio theme, maintaining a cohesive design across all pages. Adjustments can be made based on your specific design preferences and content requirements.

Post a Comment (0)
Previous Post Next Post