The text emits a soft glow even without the cursor hovering over it

I need some assistance with my code that creates a glowing effect on text. Currently, the glow effect appears not only when the cursor hovers directly over the text but also when it hovers over the area around the text. Can someone explain why this is happening and provide guidance on how I can make the glow effect trigger only when the cursor is directly over the text?

<!DOCTYPE html>
<html>
<head>
    <title>tTEXT</title>
</head>
<link rel="stylesheet" type="text/css" href="styles.css"/>
<body>
<style>
@font-face
{
    font-family: ralewaythin;
    src: url('Cantarell-Regular.ttf')
}
.backgroundimage
{
    background-position: center;
}
.text-glow-hover-with-delay
{
    color: black;
    -webkit-transition: text-shadow 0.15s;
}

.text-glow-hover-with-delay:hover
{
    text-shadow: 0 0 10px #4682b4;
}
.head
{
    font-family: ralewaythin;
    color: black;
    font-size: 75px;
    -webkit-text-stroke: 1px;
}
</style> 
    <div class="text-glow-hover-with-delay">
        <div class="head">TEXT</div>
    </div>
</body>
</html>

Answer №1

The content you've provided is enclosed in a <div> element, which by default has the style property display:block. To make this element only take up the space of its content, consider changing it to a <span> or applying the style display:inline-block.

Answer №2

To achieve the glowing effect, you must specify which text/element you want to glow within the div. You can target specific text by using the span tag. For example, you can apply the glow effect to only the header text by using the h1 element or any other tag.

Check out this example on how to set the glow effect: http://jsfiddle.net/g5EbU/1/

<span class="text-glow-hover-with-delay" >GLOWING TEXT</span>

You don't have to change your entire code, just adjust the placement of the class. Here is what your original code looked like:

.text-glow-hover-with-delay
{
color: black;
-webkit-transition: text-shadow 0.15s;
}

I hope this explanation helps! If you want me to modify your class and use a different tag like a header, feel free to let me know.

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

How can I view a comprehensive list of updates made to a webpage?

Is it possible to track and display all the modifications made to a web page? This includes new HTML elements added, old elements removed, and any changes in the location of existing elements. Currently, I am utilizing Selenium WebDriver with Java. Below ...

How to center a div both vertically and horizontally within a flex-fill using Bootstrap 4

Hello there! I am currently using Bootstrap 4 and the layout I have implemented seems to be working fine as all my pages start from the top. However, now I am trying to center the elements. <style> body, wrapper { min-height: 100vh; ...

The footer is not expanding to fill the entire width of the page

My footer is giving me trouble by not stretching to the full width on one specific page out of eight. This issue arose after I added an administration menu. Any assistance would be greatly appreciated. HTML: <div id="administraceMenu"> <ul clas ...

Is it possible to determine if a style property has been altered

I am looking to identify changes in CSS properties without needing the actual values. I only require the specific style property that has been altered. For example, I need the style property to be stored in a variable, as shown below: document.getElementB ...

Effectively replicating an HTML action in MVC ASP.NET

I am looking to replicate a basic function in HTML that is currently working for my needs, but now I need to implement the same functionality in MVC ASP.NET. Here is the original HTML code: <HTML> <HEAD> </HEAD> <BODY> ...

Difficulty encountered when trying to display multiple 3D models utilizing a URL as the source in conjunction with ar.js and A-frame

Recently delving into coding for A-frame projects has been an exciting learning experience. However, I encountered a setback while setting up a scene with multiple targets in A-frame - one of the 3D models failed to appear despite using a URL just like the ...

Is there a method to track the progress of webpage loading?

I am working on a website built with static HTML pages. My goal is to implement a full-screen loading status complete with a progress bar that indicates the page's load progress, including all images and external assets. Once the page has fully loaded ...

Achieving unique horizontal and vertical spacing in Material UI Grid

In my current Material UI setup, I have set spacing in the Grid Container to space Grid Items vertically. While this works well on larger screens, it causes awkward horizontal spacing between Grid Items on mobile devices. <Grid container spacing={24}> ...

Tips for hiding navigation items on mobile screens

I've been learning how to create a hamburger menu for mobile devices. Within a navigation structure, I have three components: Logo, nav-items, and hamburger menu. Utilizing flexbox, I arranged them side by side and initially hid the hamburger menu on ...

How to efficiently handle data binding for multiple users sharing common inputs within a table on an ASP.NET Razor Page?

I am currently working on a project that involves populating a table with member information such as name and email. Within this table, there are columns where a "warning" can be entered for each member, along with a textbox for additional information rega ...

Interactive image sliders in a Netflix-inspired style with live previews on hover, fully compatible with Bootstrap framework

I'm looking for suggestions on Twitter Bootstrap compatible jquery plugins that can create a Netflix-style continuously scrolling image carousel with mouse-over functionality. I've tried the carousel included in the Bootstrap JS library, but it r ...

What is the process for displaying a Bootstrap Icon on a webpage?

I recently started using Bootstrap and I'm in the process of creating a login screen for my app. I want to incorporate MDBIcons for Google, Twitter, and Facebook. I referred to the documentation provided at However, upon previewing my webpage, I enco ...

Execute a refresh command on a JQuery function in order to update the selection picker

Below is the HTML code I have created to allow for multiple options to be selected with live search capabilities. My knowledge of jQuery is limited, but I have included a code snippet to refresh the selections if more than one option is chosen. < ...

The height and width of a tag enclosed within div elements are effectively set to 0

For an example, please visit https://jsfiddle.net/x7znc405/1/ If the HTML structure is as follows: <div id="wrapper"> <a> <div id="content"> Hello World </div> </a> </div> Here's the CSS styling: #content ...

Is it possible to place two identical canvases on top of each other beside a separate canvas?

Trying to arrange two same-sized canvas elements on top of each other and next to a third canvas. In the figure below, I aim to have 2 and 3 positioned together, adjacent to 1. https://i.stack.imgur.com/dWkhc.png Attempting to address this issue with the ...

Troubleshooting problems with scrolltop offset top

After trying to implement a scroll function to target a specific div on the page, I have encountered an issue. My code includes scrollTop: $(target).offset().top-250 for adjusting the position in the mobile view so that the section appears below the head ...

Issue with Scrollspy Functionality in Bootstrap 4

Scrollspy feature isn't working in my code. <nav class="navbar navbar-expand-lg fixed-top navbar-dark" role="navigation"> <div class="container"> <a class="navbar-brand" href="#featured"><h1></h1></a> < ...

Using SVG sprites from external sources alongside child nodes

I am working on a website that contains multiple SVG icons and an SVG logo that need to be animated. To improve readability, I have implemented a sprite system using an external file. For loading the sprites, I am utilizing XMLHttpRequests at the start o ...

Exploring the semantic-ui dropdown menu feature in Chrome

When I first started learning to code with semantic-ui framework, I noticed a difference in behavior in Chrome compared to other browsers. The pointing menu on the left element (such as the search box) breaks down in Chrome, whereas it displays correctly i ...

Is React invoking a function?

Just starting out with React and experimenting with lists. Not sure why my code isn't working as expected - when I call the method, it just shows plain HTML. I've already tried wrapping it in <Liste /> tags, but that didn't help eithe ...