Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

how to center div

  EntireBanner: {
    position: "relative",
    backgroundImage: `url(${bgImage})`,
    backgroundSize: "cover",
    backgroundRepeat: "no-repeat",
    width: "100%",
    height: "800px",
  },
  textBox: {
    position: "absolute",
    top: "50%",
    left: "50%",
    transform: "translate(-50%, -50%)",
  },
Source by www.w3.org #
 
PREVIOUS NEXT
Tagged: #center #div
ADD COMMENT
Topic
Name
7+2 =