What are some methods to eliminate the black border from a circular icon?

When hovering over the mouse, the background color changes to black. However, I would like to remove the black border and have the icon displayed as a circle.

.our-activity-div {
  padding: 20px;
  text-align: center;
}

.our-activity-inner {
  width: 33%;
  box-sizing: border-box;
  display: inline-block;
}

.fundraising {
  max-width: 75%;
  min-height: 220px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  text-align: center;
  border-radius: 10px;
  margin: 0 auto;
  line-height: 0px;
  padding: 30px 35px;
  box-sizing: border-box;
}

.fundraise-hr {
  width: 25%;
  border-color: #000;
}

.fundraise-padding {
  text-align: left;
  padding-top: 20px;
}

.fundraising-parag {
  padding: 10px 5px;
  line-height: 1.5em;
}

.symbol0 {
  color: #000;
  font-size: 100px;
  position: relative;
  top: -28px;
  border-radius: 50%;
}

.fundraising:hover .fundraise-padding {
  color: #01d262;
}

.fundraising:hover .fundraise-hr {
  border-color: #01d262;
}

.fundraising:hover .symbol0 {
  background-color: #000;
  color: #01d262;
}
<div class="our-activity-div">
  <div class="our-activity-inner">
    <div class="fundraising">
      <span class="symbol0">&#9775;</span>
      <h2 class="fundraise-padding ">Fundraising</h2>
      <hr class="fundraise-hr "></hr>
      <p class="fundraising-parag">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
      </p>
    </div>
  </div>
</div>

Answer №1

Eliminate the background-color from .fundraising:hover .symbol0 in css

Utilize pseudo element as :after on :hover and specify demo background

.our-activity-div {
  padding: 20px;
  text-align: center;
}

.our-activity-inner {
  width: 33%;
  box-sizing: border-box;
  display: inline-block;
}

.fundraising {
  max-width: 75%;
  min-height: 220px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  text-align: center;
  border-radius: 10px;
  margin: 0 auto;
  line-height: 0px;
  padding: 30px 35px;
  box-sizing: border-box;
}

.fundraise-hr {
  width: 25%;
  border-color: #000;
}

.fundraise-padding {
  text-align: left;
  padding-top: 20px;
}

.fundraising-parag {
  padding: 10px 5px;
  line-height: 1.5em;
}

.symbol0 {
  color: #000;
  font-size: 100px;
  position: relative;
  top: -28px;
  border-radius: 50%;
}

.fundraising:hover .fundraise-padding {
  color: #01d262;
}

.fundraising:hover .fundraise-hr {
  border-color: #01d262;
}

.fundraising:hover .symbol0 {
  color: #01d262;
}

.fundraising:hover .symbol0:after {
  content: '';
  background-color: #000;
  position: absolute;
  width: 80%;
  height: 50%;
  top: 24px;
  z-index: -1;
  left: 9px;
  border-radius: 50%;
}
<div class="our-activity-div">
  <div class="our-activity-inner">
    <div class="fundraising">
      <span class="symbol0">&#9775;</span>
      <h2 class="fundraise-padding ">Fundraising</h2>
      <hr class="fundraise-hr "></hr>
      <p class="fundraising-parag">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
      </p>
    </div>
  </div>
</div>

Answer №2

Here is an example of CSS to try:

span.symbol0:hover {
    background: none !important;
}

Answer №3

Eliminate the background-color from the following code snippet:

.fundraising:hover .symbol0 {
  background-color: #000;
  color: #01d262;
}

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

Side Menu with Fixed Position Created with Tailwind CSS

Can anyone help me create a social media sidebar that stays fixed on the bottom right side of the screen, regardless of its size? Currently, the sidebar moves when I scroll down, but I want it to remain in place. How can I achieve this fixed positioning? ...

Tips for excluding a CSS property from a class override

I have a file called _buttons.scss: .btn { display: inline-block; font-family: $btn-font-family; font-weight: $btn-font-weight; color: $body-color; text-align: center; text-decoration: if($link-decoration == none, null, none); white-space: $b ...

Is it possible to interact with a particular point or element within a canvas using languages like javascript, jquery, or selenium?

I am trying to figure out how to simulate a click at a specific position within a canvas. I have tried using coordinates, but so far haven't found a way to make it work. Any other suggestions would be greatly appreciated. It's important to note t ...

Google App Engine displaying a blank screen error

I've been playing around with this concept where there's a table of 'events' on a '/search' page. When the 'GO' button of an event is clicked, it should increase the 'RSVP' count for that event and redirect ...

Guide on showcasing specific columns from a table by utilizing an HTML listbox in conjunction with SQL coding

Hello, I need assistance with a specific task. I am looking to create a table that has two columns: one for the Country and one for the Capital. This table should list every country in the world along with its corresponding capital. Additionally, I would l ...

What is the method for aligning an <img> to the right within a Bootstrap 4 card-body?

I am having difficulty aligning an image to the right within a Bootstrap 4 card-body. I attempted to use the float-right class, but it doesn't seem to be working. Are there any specific considerations for aligning images in a card-body? <div class ...

How come my gifs appear tiny even though I've adjusted their width to 32% each?

I am trying to display three gifs in a row, each taking up one-third of the width of the page. However, when I preview the page, the gifs appear tiny. I have set the divs to 32% each and the gifs should fill 100% of their respective div. Here is the code s ...

What is the best way to include Google Calendar in a div container while ensuring it is responsive?

I'm currently working on the layout of a website that features a slideshow of images at the top, followed by an embedded Google Calendar. I've encountered an issue with the responsiveness of the Google Calendar within its designated div container ...

Is it feasible to have my progress bars load only upon clicking the link for my div?

I have a link to my div called mySkills, and currently the progress bars load automatically when I access my page. However, I only want the progress bars to load when I click on the link (href) to this specific div mySkills. How can I achieve that functi ...

I kindly request your assistance in resolving the issues with the append() and empty

Here is some code I've been working on: <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> $(document).ready(function(){ ...

Switch effortlessly between one animation and another with Angular.js

I have two animations named "prev" and "next". Upon clicking the prev button, the "prev" animation should play. Similarly, when you click on the "next" button, the "next" animation should be triggered. I am using ng-class to achieve this behavior. How can ...

Margin and padding have the ability to increase the size of an image

Is there a technique to position the logo.png so that it appears approximately one-third of the way across the page without affecting its size? I've attempted to use padding or margin adjustments, but it seems to distort the image despite having limit ...

Recursive instruction malfunctioning

I'm currently trying to develop a custom recursion directive, but unfortunately it's not functioning as expected. I have followed the instructions outlined here: Recursion in Angular directives For reference, you can view the fiddle here: http ...

What is the best way to showcase my products in a horizontal line? I am seeking a solution using PHP and Bootstrap to exhibit all the items retrieved

I am experiencing an issue with displaying the most recent events from my database using PHP. The Bootstrap framework and CSS are causing them to appear as a single column on the page, but I would like them to be displayed in rows of three. I have attempt ...

Center an absolutely positioned div using CSS

What is the best way to position an absolute div at the center? <div class="photoFrame">minimum width of 600px, positioned absolutely</div> jQuery var screenWidth = $(window).width(); $('.photoFrame').css({'margin-left': ...

When adjusting to mobile dimensions, the responsive website design struggles to center the navbar properly

I am currently developing my senior year portfolio website and I am struggling to center the navbar (Work About Contact) when it is in mobile mode. My goal is for it to be positioned directly below the logo, perfectly centered, but so far nothing I have tr ...

Executing Cascading Style Sheets (CSS) within JQuery/Javascript

I've been encountering a problem with my website. I have implemented grayscale filters on four different images using CSS by creating an .svg file. Now, I'm looking to disable the grayscale filter and show the original colors whenever a user clic ...

The peculiar perspective of the radiobuttonlist

Can someone help me understand why this is happening? And what can I do to decrease its size? I am not using any CSS classes. <asp:RadioButtonList ID="radioBtnList" runat="server" DataTextField="Name" DataValueField="id" Width="100%"> It seems ...

Is it possible to incorporate HTML documents within an R Markdown file?

How to Embed HTML Files in R Markdown Files I have recently created some beautiful animated choropleth maps using the choroplethr package. The maps are created as a set of PNG images rolled into an HTML file that cycles through the images to show the anim ...

Adjusting dimensions of text entry box in popup window

As a newcomer to the coding world, I'm seeking guidance on how to resize a textbox control inside a modal window. Despite setting the width property, the textbox only occupies half of the modal window. Here's how I've structured the modal wi ...