I am trying to add CSS Styling to the built-in component Link. I attempted to wrap it in a div for styling but it is not appearing in its proper location. Can anyone tell me what the problem is with the following project? The title is in the correct location but the Link component is not.
.title {
font-style: italic;
font-size: 20px;
grid-area: title;
align-self: center;
justify-self: center;
}
.card {
background-image: url("/sexygirl.jpg");
background-size: cover;
background-repeat: no-repeat;
height: 100vh;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-areas:
". title title ."
". . . ."
". search search ."
". . . .";
gap: 1rem;
}
.search {
grid-area: search;
}
import styles from "/styles/WelcomePage.module.css";
import Link from "next/link";
import Card from "/pages/WelcomePage/Card";
function WelcomePage() {
return (
<>
<Card className={styles.card}>
<h1 className={styles.title}>This is the Title</h1>
<div className="search">
<Link href="/ClassSearch">
<a>Class Search</a>
</Link>
</div>
</Card>
</>
);
}
export default WelcomePage;