Repository navigation
Cannot center my image on MyLayout.vue. #4944
Unanswered
StickyChannel92
asked this question in
Q&A
Replies: 1 comment
|
<template>
<Layout>
<template #not-found>
<img class="notfound-img" src="/assets/image/error.png" alt="Carl lying dead on the floor" />
<div class="NotFound">
<!-- ...rest of your 404 markup... -->
</div>
</template>
</Layout>
</template>
<style scoped>
.notfound-img {
display: block;
margin: 0 auto;
max-width: 100%;
}
</style>(Inline also works: Tested on VitePress 1.6.4: the image is centred on the 404 page. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I need to center my image, so that I can have a personal 404 page using not-found.
Unfortunately, I tried every method on Google, but the image always never appears in the center:
Error1.vue:
index.ts:
All reactions