What is the process for displaying text in front of an SVG image?

How can I display text in front of an SVG Image? When I try to do this, the text keeps getting hidden behind the image.

This is how my CSS code looks:

.Default_View_Text___{
    position: relative;
    margin-top: 190px;
    margin-left: 30px;
    top:25.05%;
    z-index: -10px;
    font-family: 'Poppins';
    font-weight: bold;
    font-size: 17px;
    color: #1A73E8;
}

I really need to fix this issue. How can I make sure that the text appears in front of the SVG?

Edits Made:

Here is a snippet of the HTML code:

import React from 'react';
import logo2 from './logo2.svg';
import clock from './clock.svg';
import msgbox from './msgBox.png'
import bellicon from './bell-icon.png'
import tab from './tab.svg';
import vis from './vis.svg';
import './HomeDashboard.css'

const DashBoard = () => {
    return (
        <div className="BBDashBoard__">
            <div className="DashBoardSideBar__">
            </div>
            <div className="TopBarNav___">
                <img src={logo2} className="betaLogo__" alt="logo" /><span className="NameSpecHolder__"> Welcome, <strong className="DisplayName__">John</strong> &nbsp;<button className="DispAminName__">Admin</button><img src={msgbox} className="MessageAreaBox__" /><img src={bellicon} className="BellIcon__" /></span>
            </div>
            <div>
                <h4 className="MainPageExTap__">Estimates</h4>
            </div>
            <div>
                <h4 className="MainPageExTap__2__">Recently added</h4>
            </div>
            <div>
                <h4 className="Default_View_Text___">Default View</h4>
            </div>
            <div>

            </div>
            <div>
                <div className="TableCustomersBleBg__">
                    <img src={tab} className="blueBg__"/>
                </div>
                <div className="TablesCustomerWhiteBg__">
                <img src={vis} className="whiteBg__"/>
                </div>
                <div>
                <table border="0" width="100%">
                    <tr>
                        <td>&nbsp;</td>
                    </tr>
                </table>
                </div>
            </div>
        </div>
    );
}

export default DashBoard;

This is a condensed version of the HTML code as the CSS part was quite lengthy and had to be trimmed down.

Answer №1

After making some adjustments to the values, everything is functioning perfectly.

The CSS code appears as follows:

Custom_View_Text___{

        position: absolute;
        margin-top: 20px;
        margin-left: 120px;
        top:25.05%;
        z-index: 1;
        font-family: 'Roboto';
        font-weight: normal;
        font-size: 18px;
        color: #FF5733;
    }

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 close the colorbox and open a new regular window when clicking a hyperlink?

Hey there, I'm currently facing an issue with closing a colorbox when clicking "Click here to return to our website" and opening a regular browser window instead. You can check out the problem on this page: On the left navigation bar at the bottom i ...

Using PHPMailer in conjunction with a textarea form and HTML

Currently, I am attempting to piece together code from a PHP tutorial that demonstrates how to create a basic PHPMailer form for sending plain text emails to a mailing list. The simplicity of the form is ideal as it will be used by only a few individuals. ...

Aligning Divs in a Responsive Browser

In the following illustration, I am facing an issue with my responsive code. I have three sections named square1, 2, and 3, each containing a white div with text on top and an icon positioned absolutely. Everything works fine when the browser width is 920p ...

Query regarding the positioning of div elements and responsive web design

After using the website builder 'cargo', I found it too limiting for my needs and now I want to code the site myself. There are two specific features from the cargo design that I am trying to replicate: I would like the divs to resize proport ...

Getting rid of an accidental div around an input field that was generated by Bootstrap with the help of

I have been experimenting with creating a slider using Jquery and storing the input in an <input type="text" readonly>. Everything was working fine until I tried to place the input inside a popup-window div. This caused an extra div to be created aro ...

When running `node compile.js`, no combined CSS file is being created

I have finally mastered the art of setting up and executing the "node compile.js" file in the claro theme folder to compile each *.less file into its corresponding *.css file. However, I noticed that the old claro.css file remains unchanged. Is this the in ...

Keep the bootstrap label text fixed below the input field

I'm working on creating a file upload style using bootstrap. The code below is functional, but I'm facing an issue where the label Choose file appears below the input field rather than in the middle. How can I adjust the positioning of Choose fil ...

Issues with Swiper functionality in Jquery Mobile

I have implemented the Swiper plugin by idangero.us along with jQuery Mobile... In this case, I am utilizing the Scroll Container Swiper for a content slider... However, I am encountering several difficulties when trying to integrate the code... You can ...

Incorporate an image into a td by utilizing vbscript

Is there a way to insert an image into a td element using vbscript? I specifically require an "img" element and not a background image. The implementation must be in vbscript. <script type="text/vbscript"> function onload() '//Add Image to td1 ...

Use CSS flex to ensure that each row contains a minimum of two items without cutting off the text too much

Currently, I am in the process of designing a CSS layout for items with some specific requirements: The layout should accommodate at least two items per row, and more if the items are narrow enough to fit on one line. If an item's content is too leng ...

CSS Background color only applies to the lower section of the page

I'm attempting to create a social media button using an anchor tag and a fontawesome icon. My goal is to have the entire background colored black with CSS, but my previous attempts only resulted in the bottom half turning black. https://i.sstatic.net ...

The variable is remaining stagnant

So I wrote this script. Inside the createApp function, there's a variant variable. I'm logging the content with console.log(variant) after axios.get(). It should change to results.data.variants[0], but it's not working... need suggestions? ...

Approach needed to assign identical CSS property to various classes that are dynamically created via ngFor in Angular?

I am currently working on writing CSS for dynamically generated classes. I have set up the classes using ngFor as shown below: <div style="max-height: 450px;" *ngFor="let item of data; let i = index" class="card{{i + 1}}"> ..... </div> Now, I ...

Troubleshooting problem with CSS scaling on smartphones

I'm attempting to create a website (the first one I've ever designed) dedicated to my girlfriend's cat. However, when viewed on a mobile device, it doesn't look good. I've made an effort to adjust the meta viewport tag, but it does ...

Tips for saving an array of objects in local storage and transferring it from one file to another

Recently delving into the world of localstorage, I've encountered an issue while attempting to store JSON data in one file and retrieve it in another. The JSON data below was fetched from a URL, and my goal is to obtain all the feed objects in the oth ...

JQuery fails to remove the "display:hidden" attribute

List of methods I attempted: Utilizing .removeClass and addClass functions Applying show() and hide() methods Modifying the CSS properties Initially, I confirmed that my script contains onLoad. Furthermore, all other elements are functioning correctly. D ...

Live PHP statement continuously updates display

Below is the setup for my input field. The question to fill in the input will only be prompted if either $client_chargeBy is equal to "Square Foot" or "Room" <div class="col-md-12 p0 "> <div class="col-md-6 PL0 p0_smresp"> <di ...

Using solely JavaScript, the process of eliminating parameter values from a URL on the subsequent page

Seeking assistance in removing the values from the URL after the "?" once transitioning to the next page from the initial page. Despite multiple attempts, I have been unable to find the correct solution. Any help would be greatly appreciated. Desired URL ...

challenges arise when using star icons to rate items visually, as the corresponding hidden values for backend processing are linked to radio input types

Hello, I am trying to retrieve the value of an input type radio by clicking on a star image visually. I have been successful in this, but I am having trouble resetting the star image in another row. You can view a demo of this here. I will explain what I ...

Display validation messages when the user either clicks out of the textbox or finishes typing

Here are some validation messages: <form name="dnaform" novalidate> <div style="padding-bottom:5px" ng-show="dnaform.uEmail.$pristine || dnaform.uEmail.$valid">Active directory account </div> <div style="padding-bottom:5px;" n ...