Gliding over the problem with the Azure line

Is there a way to hide the opacity and font on hover? I have tried using outline: 0; in my CSS but there is still a blue line lingering. Any ideas on how to remove it?

If you need to see the code and the issue I'm describing, here it is:

p {
  font-size: 45px;
  padding: 142px 0;
  border-radius: 10px;
  outline: 0;
}

p:hover {
  color: rgba(255, 255, 255, 0);
  background-color: rgba(255, 255, 255, 0);
}
<div class="container painting-container">
  <div class="row">
    <div class="border-box col-xs-12 col-sm-12 col-md-6">
      <a href="#">
        <div class="box-image canvas-main">
          <P>CANVAS</P>
        </div>
      </a>
    </div>
    <div class="border-box col-xs-12 col-sm-12 col-md-6">
      <a href="#">
        <div class="box-image wood-main">
          <P>WOOD</P>
        </div>
      </a>
    </div>
  </div>
</div>

Answer №1

If you're looking to apply underline to a link, use the 'text-decoration' property on the anchor element, not the paragraph element. Here's an example:

p {
        font-size: 45px;
        border-radius: 10px;
        outline: 0;
    }
    p:hover {
        color: rgba(255, 255, 255, 0);
        background-color: rgba(255, 255, 255, 0);
    }

a:hover {
      text-decoration: none;
}
<div class="container painting-container">
    <div class="row">
        <div class="border-box col-xs-12 col-sm-12 col-md-6">
            <a href="#">
                <div class="box-image canvas-main">
                    <p>CANVAS</p>
                </div>
            </a>
        </div>
        <div class="border-box col-xs-12 col-sm-12 col-md-6">
            <a href="#">
                <div class="box-image wood-main">
                    <p>WOOD</p>
                </div>
            </a>
        </div>
    </div>
</div>

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

Another element concealing an element underneath

I am currently working on a website and could really use some assistance. Being new to web design, I find myself puzzled by this particular issue. The problem I'm facing is with a sawtooth pattern that should be displayed over a header, similar to the ...

What could be causing media queries to not update values even after being changed through JavaScript?

I have a simple navigation bar on my website, featuring links to different subpages. To enhance the user experience on mobile devices, I added a hamburger menu icon that is displayed on smaller screens. The links in the navigation bar are hidden using CSS ...

Ways to modify the background color of the entire body excluding a sidebar div

How do I implement an overlay and dim the screen after clicking on a menu button? <ul id="gn-menu" class="gn-menu-main"> <li class="gn-trigger"> <a class="gn-icon gn-icon-menu"><span>Menu</spa ...

Display the background-image of the <body> element only when the image has finished loading

I have a webpage where I want to delay showing a large image until it has finished downloading. Instead, I would like to display a background with a fading effect while the image loads. The challenge is that the background image must be set within the bod ...

The hexadecimal code for the textured background color of an iOS Scroll View in CSS

Can someone share the specific CSS color code with me? I would like to apply this same color to my website. Appreciate it! ...

Creating an array of form input names using JavaScript within the HTML input tag

I have a two part question that I'm hoping someone can help me with. There was a similar question asked recently that included information about this particular type of array in PHP, but unfortunately, I can't seem to locate it at the moment. 1. ...

What is the method for altering the date format of a published article?

I am looking to modify the date format of a published post in WordPress. Currently, the date format is <?php the_time('m.d.y'); ?></div>, which appears as "1.20.2018". My goal is to change it to "January 20, 2018". Can anyone guide ...

Chrome browser alignment problems

Here are the lines in my code: <TD id=“avail_1” style=“display:none;availability:hidden”>UrgentAvail</TD> <TD id=“avail1_1” style=“display:none;availability:hidden”>substitutedBy</TD> When I test the application o ...

Retrieve particular JSON information on a single webpage by selecting an element on a separate page

My goal is to fetch specific information from a JSON file and display it on different HTML pages by clicking a button. I will achieve this using jQuery and plain JS. For the first HTML page, I want to show all products from the JSON in an element with id= ...

Choose a single dynamic image from a collection of multiple images

In the process of developing a Shopping cart website, I encountered an issue regarding allowing users to upload multiple images of a single product. Using jQuery, I successfully cloned the file input section to enable uploading additional images of the sam ...

Sending user input from search component to main App.js in React

I'm currently working on an app that searches a Movies database API. I have a main fetch function in App.js, and in tutorials, people are using a search bar within this main APP component. I'm wondering if it would be better to create a separate ...

Animate the border to move to the next list item after it is hovered over

Seeking assistance to animate border-bottom movement in navbar Desiring animation effect for hover event on second li item The code for the navbar is as follows: .top-bar { background:#0d0d0d; width:100%; height:85px; position:fixed; top:0; z-index:99 ...

Three-color linear gradient SVG with a middle color expanding in width

I'm working with a linear gradient and here is the code: <svg width="120" height="240" > <linearGradient id="dsp" x1="0" x2="0" y1="0" y2="1"> <stop class="stop1" offset="0%"/> <stop class="stop2" offset="50%"/> ...

When the mouse is clicked, the character fails to reach the intended destination or moves in the wrong direction on the HTML canvas

UPDATE: RESOLVED I am currently working on a game where the character moves by right-clicking. The character is meant to walk slowly, not teleport, towards the destination set by right-clicking on the canvas. However, I have encountered an issue where the ...

How to position an absolute div in the center of an image both vertically and horizontally

Can someone help me figure out how to center a div inside an image? I seem to be having trouble with the positioning and alignment. Any suggestions or advice would be greatly appreciated. Thanks! .template-banner{ width: 100%; height: auto; margin: 0; } ...

"Using jQuery to trigger a click event on a specific column within

Welcome to my HTML table. <table id="status_table" class="table table-bordered"> <tr> <th>Serial Number</th> <th>Product Number</th> <th>Description< ...

Troubleshooting: Android compatibility issues with dynamic source for HTML 5 video

My HTML5 video with dynamic source loaded using JavaScript is functioning properly in a web browser but encountering issues within an Android PhoneGap build application. Take a look at the code snippet below: JavaScript code: $('#video_player' ...

Navigating the translation URL in a Node.js Express app

Can someone please guide me on how to handle routing for translated URLs in a Node.js Express application? In my app.js file, I currently have the following routes. How can I improve this setup for handling URLs that change based on language, while still ...

Issue with content overlapping when hamburger icon is tapped on mobile device

When the hamburger menu is pressed on smaller screens, I want my navbar to cover the entire screen. To achieve this, I included the .push class in my code (see the jQuery and CSS) to trigger when the .navbar-toggle-icon is pushed. However, after implemen ...

If a radio button is chosen, the input field must be filled out

Can someone assist me with this issue? I currently have 2 radio buttons and it is mandatory to select one of them. If the user chooses the first option and submits the form, the information gets sent successfully as intended. However, if the user select ...