Overruled fashion

Here is the HTML code from my custom page:

<div class="notes quotes-notification member-savings f-left">
<h2>My Notifications</h2>
<ul>
<li><b>I need to make some changes in the HTML, different from other pages you have worked on regarding your account.</li>
<li>An <a href="#">answer has been posted</a> to a question you submitted.</li>
<li>A shop responded to a <a href="#">review you posted</a>.</li>
</ul>
</div>

The quotes-notification and member-savings classes have distinct CSS styles as follows:

.member-savings {
    width: 19%;
    margin-right: 1.6%; 
    border: 2px solid #0c86c9;
}
.quotes-notification{
    width: 32%; 
}

Although I want the Notification block to be 32% wide, it currently takes up only 19% due to conflict with the specified width. Is there a way to ignore the 19% width without removing the member-savings class?

Answer №1

To achieve the desired effect, one method is to use !important with width:32%;. However, this approach is not generally recommended. Another option is to increase the specificity of the CSS declaration for quotes-notification. For example, instead of:

.quotes-notification{
    width: 32%; 
}

You could try something like:

body div.quotes-notification {
    width: 32%; 
}

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

Policy regarding copyright content removal and protection of privacy

In the majority of musical websites I have come across, they often mention the following in their policies: At this particular website (www.Indiamp3.com), you will find links that redirect to audio files. These files are hosted elsewhere on the internet a ...

Stopping CSS animations at a specific point along the path without using timing functions can be achieved by implementing a targeted

Is there a way to pause an animation at the 50% mark for 2 seconds and then resume? P.S. The setInterval method is not recommended! function pauseAnimation() { document.getElementById("0").style.animationPlayState = "paused"; }; var pauseInterval = set ...

Transforming HTML with JavaScript

I am facing a challenge in my JavaScript application where I receive HTML code from an endpoint that contains radio buttons. Unfortunately, I cannot modify the HTML content coming from this endpoint. My goal is to convert these radio buttons into regular b ...

Issue with website header disappearing

I'm currently struggling with an issue - I can't seem to pinpoint the problem. The header of a website template is functioning perfectly in 1280*800 resolution, but it's breaking on larger monitors (1900*1440). The header consists of three d ...

Methods for verifying if a file is included in another file, while disregarding any whitespace adjustments

Let's say I have multiple CSS files (a.css, b.css, ..., e.css) and after concatenating and compressing them, I get a new file called compressed.css. Now, I need to verify if each of the original CSS files is included in the compressed.css file. Are th ...

Restrict the number of simultaneous image downloads in HTML

I am currently seeking the most effective solution for throttling image downloads in a Single Page Application. Issue: When on a slow network and navigating to a details page, there is an overload of image downloads occurring which pushes browser connect ...

Using jquery to create HTML elements but unable to remove them using jquery

I'm facing an issue with removing newly created li elements in an unordered list using jQuery. The delete button works perfectly fine for the existing li, but not for the ones added dynamically. <!DOCTYPE html> <html lang="en> <head> ...

What is the process for creating an HTML file that can automatically save?

I am looking to develop a unique HTML document where users can enter text in text fields, save the file by clicking a button, and ensure that their changes are not lost. It's like what wysiwyg does for HTML documents, but I need it to be integrated di ...

The dropdown functionality in Bootstrap appears to be malfunctioning

Struggling to make the drop-down menu function properly in Bootstrap, but so far no success. Check out the code on this jsfiddle link. <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-to ...

Introducing a new left overlay panel popup feature using jQuery Mobile

I'm currently developing a mobile app and I'm having trouble getting a popup to launch on the left overlay panel when clicked on "Sign out". I can't figure out where I'm going wrong. Can someone please provide some suggestions? Thank yo ...

Arrange the HTML DOM elements in the order of their appearance in a list

Is it possible to rearrange the order of <div> and its elements based on database information? For example, consider the following HTML structure: <div id="container"> <div id="A"> Form elements for A</div> <div id="B"& ...

How can I eliminate unnecessary gaps in a CSS slider design?

Currently, I am in the process of learning CSS3 and attempting to create a purely CSS slider. Everything has been going smoothly until I encountered an unexpected padding or margin within my slider. After making some adjustments to the margins, the issue ...

Positioning a single column of iframes in the center

I have 6 graphs that I need to arrange in a grid with 2 rows and 3 columns. Each row should have one left-aligned graph, one center-aligned graph, and one right-aligned graph. However, the center-aligned graphs are not displaying correctly. Can someone hel ...

Email Embedder - Incorporating HTML source code into email communications

I've encountered an issue where the CDNs (Bootstrap and FontAwesome) do not work when I embed my HTML source code into an email. Despite using inline styling throughout, the receiver still faces this problem. Any insights on why the CDNs are failing t ...

Experience the seamless transition of new CSS animations

I designed a basic HTML game where a moving box disappears when clicked on. However, the animation that follows does not originate from the click location but rather from the original position. I believe the remove @keyframes at 0% should be based on the ...

CSS opacity is currently not working as intended

Why doesn't the opacity work here? I've tried using hex and rgba colors, but nothing changes. Even adding classes to tr and td didn't help... First attempt: .done{ background-color: rgba(0,175,51,5); color:white; opacity: 50; ...

Access the original source code using jQuery

Is there a way to retrieve the raw HTML code (as seen in Chrome's source code window) using JQuery without having quotes converted to &quot or HTML symbols converted to text? I have tried using html() and text(), but neither method seemed to give ...

Changing the background color to white causes the progress bar line to become indiscernible

Here's how my form appears: Once I set the container to be: <div class="container" style="background:white;"> I want to make it white and ensure that the progress bar is visible. Any suggestions on how to achieve this? CSS: ...

Is it possible to create an HTML link that prevents users from navigating back to the previous page or displaying the previous link in their browsing history?

I've been tasked with creating a button on a client's website that links to another page, like Google, for the purpose of assisting someone seeking help in case of an emergency. The challenge is finding a way to prevent the user from easily retur ...

What could be causing the unresponsive hamburger button on my navbar?

As a beginner in HTML and Flask, I am attempting to create a navbar. However, I am encountering an issue with the hamburger button not functioning properly. When I resize the window smaller, the hamburger button appears but does not show the items like "Lo ...