How to add text on image in ReactJS?

I learning ReactJS. Today i decided create my own blog. For header needs image with some text. And when trying add text on image, text slides down.I need to my text position will be at center

[enter image description here] 1



import React from "react";
import './header.scss'

const Header = () => {
  return (
      <div className = "head-text">
        <div className = "head-image">
          <img src = {require ('../ images / Header.png')} alt = "Freedom Blog" />
          <h3> Welcome to my Blog </h3>
          <p> FREEEEDOM </p>

export default Header;


import React from 'react';
import Header from './components/Header';
import './index.scss'

const App = () => {
  return (
      <Header />

export default App;

css files are empty, so i didn't added them

Read more here:

Content Attribution

This content was originally published by Freedom Essence at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: