Designing a custom CSS Stylesheet to enhance the look and feel of various pages on a

I am currently in the process of creating a website with only two main pages - an "Index" page and an "About Me" page. However, I have run into a dilemma when it comes to editing the CSS style on the About Page.

Both my About and Index pages have adopted the same template from my main HTML (which was created from scratch). While having a consistent design is fine overall, I would like the About Page to have a distinct look from the Index Page. Every time I make a change in the editable region that should only apply to the About Page, it unintentionally affects the Index Page as well. The same issue arises with the stylesheet - I want different colors and styles for the About Page, but any changes seem to affect the entire website.

Here is an overview of the current layout of the site: [Homepage and about page](https://www.dropbox.com/s/9a7nm2c6uulbx3e/Untitled-3.jpg)

At this point, both pages share the same template, editable region, and CSS, making them look identical. My goal is to remove the div class:"notes" from the About Page, widen the div id="main-content", completely revamp the style including colors, without impacting the Homepage. How can I achieve this? Please advise.

Thank you

PS: I am using Dreamweaver CS6.

Main DWT HTML/Same HTML structure for the About and Index pages; the only difference being the content for each.

<code> 

<!doctype html>

<html>

<head>
<!--JavaScript that enables Internet Explorer (version 8 and below) to recognise HTML5      elements -->
<script type="text/javascript">
document.createElement ('article')
document.createElement ('nav')
document.createElement ('aside')
document.createElement ('header')
document.createElement ('footer')
document.createElement ('main')
</script>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/timothy.js"></script>

<link href="../css/stylesheet.css" rel="stylesheet" type="text/css" media="screen">

<meta charset="utf-8">
<!-- TemplateBeginEditable name="doctitle" -->
<title>My Uni Website</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
</head>


<body>
<!--Write web page content and markup within the 'body' tags -->
...

<code>

Answer №1

To organize your CSS styles effectively, consider creating separate files for each page such as about.css and home.css. Link the about.css file to your About page and home.css to your Home page.

When linking CSS files, use the following code:

<link rel="stylesheet" type="text/css" href="home.css">

It is essential to note that CSS files are loaded in order, so ensure that the most important CSS file is listed last if there are conflicting styles. This will help avoid any issues with style overrides.

<link rel="stylesheet" type="text/css" href="about.css">
<link rel="stylesheet" type="text/css" href="home.css">

If your styles are currently inline within the HTML file, you can transfer them directly into the relevant CSS file by cutting them from inside the <style> tag.

In case changes made to your CSS do not take effect, it might be due to caching. To resolve this, reset the website and clear the browser cache to ensure that the updated CSS styles are displayed correctly.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Scouring through the text to find a specific word and bring it to the forefront

I need help creating a PHP script that can analyze a text input, which could be an extensive essay, and search for a specific word entered by the user. The script should display the entire text with the searched word highlighted whenever it is found. < ...

Specific height of a table row <tr>

I'm having difficulty setting a PRECISE height on an html table row. https://i.sstatic.net/5mP39.png The left column consists of two divs, each with a height of 44px, while the right column contains the table. The height of each row is set to 44px, ...

Having difficulty adjusting the padding of the Material UI table

I have been using the Table component provided by the material-ui library in my React project. However, I have encountered an issue where each row, including the header, has a padding of 24px on the top and bottom that I am unable to modify or overwrite. D ...

How can I use Angular to automatically check a checkbox while a page is loading?

I have a list of checkboxes, and based on the selected checkbox, offers are displayed. Everything is working fine as expected. Below is the code snippet I have implemented: function Test1Controller($scope) { var serverData = ["Samsung Galaxy Note ...

How to retrieve FormData data using Axios

One challenge I'm facing is with an application that I have developed using VueJS, where users can upload files and send them to the backend. The process involves using Axios to send the file as FormData. However, once the file is received on the back ...

When inserting the HTML of a webpage into an iframe, the displayed content may vary slightly from the original page

I am facing an issue with my webpage where I extract the html, transmit it via websockets using socket.io to another page containing an empty iframe, and then inject the html dynamically into the iframe. My code for injecting the html looks like this: fr ...

Guide to generating dynamic multiple fields in AngularJS

I have an AngularJS app where I am adding multiple dynamic fields within a form. Here is how I have tried to do it: The JavaScript file looks like this: $scope.commonData = [{ 'a': '', 'b': '', }]; $scope. ...

Having trouble with the tooltip not showing up on the fontawesome icon button?

I am experiencing an issue where the tooltip is not appearing for a fontawesome icon nested inside a element. <i class="fa fa-random" title="some tooltip"></i> Here is the CSS style being applied: i.fa { display: inline-block; } ...

IE6 disrupts stored layouts

I've encountered a strange issue with my design in IE6. It loads perfectly at first, but after reloading it a couple of times, everything suddenly collapses. The strange part is that when I upload an updated version, it fixes the issue, only to break ...

Within a div element, there are links that I would like to hover over to emphasize the text

Hey there, I'm looking to make the text change color when you hover over the entire div. Currently, only the background changes color, but I want the text to as well. Thank you for your assistance! .shadow-box .service-box {text-align:center;borde ...

Creating multiple lines with kineticjs in a HTML5 environment can be a

Referencing the following page: KineticJS - Drawing Lines with Mouse KineticJs is effective in creating lines, shapes, and enabling drag-and-drop functionality. The provided example consistently redraws the same line, prompting the question of how to draw ...

execute the function after the animation has finished

Is it possible to trigger a function once an animation is complete using jQuery? Here's the code I'm working with: $('html, body').animate({scrollTop:$("body > .addAccountForm1").offset().top }, 'slow'); I want to execut ...

Utilizing the each() method to cycle through multiple unordered lists and concealing any nested list items exceeding a count of 8

Struggling to figure out how to loop through all ul elements with a class of ul.children and hide any child elements under ul.child that exceed 8. See the snippet of code below for reference: $(function() { $('ul.children').each(function() { ...

What is the procedure for adding my API key to the URI provided by British Airways?

Here is the British Airways developer site link: How can I apply my API key to this link in order to access information? URI Format: To access a resource, use the URI format below: https://api.ba.com/rest-v1/{resourceVersion}/{resourceName};{filters} ...

Dropdown menu change event malfunctioning

I am facing an issue with my HTML form that contains multiple text fields and dropdowns. I need to loop through all the dropdowns for validation purposes. Initially, only the first dropdown is visible when the page loads. The rest of the dropdowns become v ...

Using Python Selenium to extract data - a step-by-step guide

Here is the link you are looking for: I have successfully accessed this website using Selenium-Webdriver in Python. My next task is to extract the information about the battery type. https://i.sstatic.net/mSd6Y.jpg ...

My CSS is giving me some trouble

Currently, I have 4 widgets with different sizes placed within a main div called #box. To center them, I reduced the width to about 60% and set margin left and right to auto. However, when I zoom out in my browser, the widget blocks move more to the left a ...

When adjusting the top margin of the main content in CSS, the fixed top navigation section's margin also decreases simultaneously with the main content

I am in the process of creating a basic static blog page using HTML5, SASS, and CSS. While working on the design, I utilized the 'nav' semantic element for a fixed top bar on the page that remains visible even when scrolling down. Additionally, ...

What is the best positioning option to choose: "Relative? Static, or something else?"

I decided not to use float for positioning my divs in CSS; instead, I used the position property with relative value. However, when viewing the site on different screen resolutions, all the divs end up getting jumbled. Can someone please explain what I m ...

Having trouble aligning items (3) in the center on top of other elements (3) using flexbox

Currently, I am working on developing a community blog/website called THPSBlog. Utilizing the FlexBox feature, I divided and designed a banner with three distinct sections. NEWS | MEDIA | COMMUNITY The banner consists of three i ...