Having trouble understanding why <p> and <h3> elements are displaying as links?

Starting my journey in front-end development with my first website project. Using HTML, CSS, Bootstrap, and Flask.

Encountering an issue where my code is styled like a link instead of plain text. It appears blue and becomes underlined when hovered over.

<div class="container col-md-6 col-lg-5">
    <hr>
    <p class="lead" id="repo-title">Welcome to the repository of my publications.</p>
    <p id="repo-intro">Introduction to repository. This is the sum of my work, from many different projects. It is listed in chronological order. Use the navigation on the left-side to filter through the repository by subject, project or publication format.</p>
</div> 

No Bootstrap classes seem to be causing this issue. The style inheritance from _reboot.scss:13 sets the hover color to blue.

a:hover {
    color: #0056b3;
}

Tried to correct with custom CSS:

#repo-title, #repo-intro
{
    color:black;
}

#repo-title:hover, #repo-intro:hover
{
    text-decoration:none;
}

Font color changed, but underline and cursor change remained upon hover.

Sharing my custom CSS stylesheet for review:

body
{
    margin:0;
}  

#headline 
{
    font-size: 64px;
    color:white;
}
#headline:link, #headline:visited
{
    text-decoration: none;
}

#headline:hover, #headline:active
{
    color:white;
}

/* Remaining CSS code omitted for brevity */

Appreciate any guidance on this matter.

Answer №1

  1. Utilize an IDE such as Sublime Text or Webstorm to identify unclosed tags and code errors. It is possible that you are not using the correct format for tags or may be missing something.

  2. Create a new page with a simple HTML form to troubleshoot if the problem is occurring on all pages.

  3. Press ctrl+u in your browser to check for errors (missing tags and errors will show with red text).

  4. Disable all browser extensions and use incognito mode.

  5. To override Bootstrap style codes, you can use !important.

Example:

#repo-title:hover, #repo-intro:hover
{
    text-decoration:none !important;
}

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

Enhanced button effect: image shaded on hover

Can someone help me figure out how to make the button and image darker when hovered over? I tried something but it didn't work... Here is a demonstration: http://jsfiddle.net/h2o8w5y6/ <!--- example code snippet --> <div class="col-lg-4 ...

When JQuery is written in a separate file, it does not get applied in the HTML file

I've encountered an issue that seems to have similarities to others, but despite trying various solutions and writing JQuery code in a JS file, I can't seem to get it to work properly. When I include the path for the JS and JQuery version in the ...

Using JQuery to modify several background images in unison

I have a CSS code that uses 8 images to create a frame: background-image: url(images/blue/tl.png), url(images/blue/tr.png), url(images/blue/bl.png), url(images/blue/br.png), url(images/blue/t.png),url(images/blue/b.png),url(images/blue/l.png),url(images/b ...

Troubleshooting techniques for resolving CSS issues with the video.js package in ReactJS

When using video.js in react to build a video player, I encountered an issue with the npm package not providing its inbuilt CSS. How can I add the inbuilt CSS of video.js? Instead of the control bar, I am getting something different than what is shown in t ...

Sending multiple unique forms with the same structure using JavaScript and Ajax on a single PHP page

In my PHP page, there are 12 individual forms with unique form IDs, checkboxes, and dropdowns. Take a look at this image: https://i.stack.imgur.com/pODzk.png Each form has an Update Zone that fetches Name, Enable status, Time, Dim information, and sends ...

Never-ending accessible document available for download to test internet speed

For my download speed tester project, I am implementing a straightforward method. I download a large image file from the internet and check if it arrives within a reasonable time frame. The specific file I am using is sourced from here. However, I am conc ...

What's the best way to create flying text effects - using CSS or JavaScript

Looking for a way to enhance the user experience of my shopping cart on Android and iPhone/iPod, I want to implement a feature similar to the iTunes Store where the price flies down to the total when a purchase is made. Since I use jQuery (not UI) on this ...

Ways to shift footer lower if there is a floating element in the div above it

Trying to move my footer to the bottom of the page, regardless of the amount of content above it. After researching online, I came across a solution on this website: However, everything was fine until I added "float: left" to the content div. Suddenly, th ...

What is causing the divs to not stretch across the entire width of the parent div?

Interactive Code Example: Snippet: <div style="width: 100%; overflow: hidden; height: 65px; background: #00CC00;"> <div style="width: 60%; overflow: hidden; float: left; background: #3074A3; color: #EDEDED; height: 65px; text-align: center; ...

How to retrieve the current event handler's value with jQuery

To assign an onclick event handler using jQuery, I simply use the following code: $('#id').click(function(){ console.log('click!'); }); Now, my question is how can I retrieve a reference to the function that is currently handling th ...

Is there a way to alter the background image of the logo specifically for mobile device viewing?

Here is a snippet of my HTML code: <nav class="navbar navbar-expand-lg navbar-light bg-light"> <a class="navbar-brand" href="{{ route('home') }}"> <img src="{{ asset('assets/images/logo-school-icon.png') }}" ...

Python script for launching a .html file and automating the process of clicking the submit button

I am currently working with a .html file where I need to send a value using a submit button. Here is how the code looks: <HTML> <HEAD> <TITLE>ABC Corporation</TITLE> </HEAD> <BODY> <FORM ACTION="http://192.168.2.2/cg ...

Is there a way to utilize a single function on two separate div elements?

Looking for a way to optimize my code that contains the addRow() and deleteRow() functions. Currently, I have duplicated these functions for both radio buttons and checkboxes. Is there a more efficient way to achieve this? function addRow(tableID) { ...

Solving the issue of IE7 div overflow-y: scroll causing content to be obscured by the scrollbar

I am facing an issue with a table inside a div (#body) that scrolls along the y-axis. Specifically, in Internet Explorer, the scrollbar is hiding part of the last table cell behind it, causing a shift in the layout of the table columns. This problem does n ...

What is the best way to obtain a date in the format of yyyy_mm_dd from a datepicker tool?

I am working with 2 datepickers that have similar structures, but different names. The first one has the id "fecha_1_1" and the second one has the id "fecha_1_2". <div class="col-sm-3"> <p>Desde</p> <div class="f ...

What is the best way to design a bookmarklet that can overlay an HTML/div layer and apply CSS styles from an

Is there a way to incorporate a bookmarklet that can bring in a new layer/div with additional HTML and CSS from an external file, overlaying it on the current page? If anyone has an example of a bookmarklet that achieves this, would you be willing to shar ...

Updating the div#content dynamically with Jquery without the need to refresh the page

After spending countless hours on this forum, I have yet to find a solution that perfectly fits my needs, so I will pose my question. Here is the gist of what I am attempting to accomplish: When the page loads, the default page fades in and displays. Wh ...

Launching event handlers and applying CSS classes within a single scenario

How can I toggle the visibility of a button based on form field validation in JavaScript? I want to show or hide the button when the .confirm button is clicked, and if the form is valid, add a checkmark to the body element through event listener. The issu ...

Using jQuery to insert a new string into the .css file

I'm currently working on a jQuery function to make my font size responsive to changes in width. While I am aware of other options like Media Query, I prefer a solution that offers smoother transitions. Using vw or vh units is not the approach I want t ...

Advantages and disadvantages of fetching image paths repeatedly from the database compared to retrieving them from session storage

Currently, I am displaying profile images using session like the following code snippet: <img src="<?php if (isset($_SESSION['userimage'])){ echo $_SESSION['userimage']; }?>" /> What are the advantages and disadvantages of ...