Regarding multiple descriptions of style attribute
Answered
Transvaal lion posted this in #help-forum
Transvaal lionOP
I would like to rewrite the style attribute of the code below for Next.js, but I'm having trouble figuring out how to do it.
I would appreciate it if you could help me
I would appreciate it if you could help me
<div className={`${styles['carousel-caption']} ${styles['d-flex']}`} style="position: absolute;top: 0px;left: 50%;width: 50%;height: 100%;"></div>Answered by joulev
<div
className={`${styles['carousel-caption']} ${styles['d-flex']}`}
style={{
position: "absolute",
top: 0.
left: "50%",
width: "50%",
height: "100%",
}}
>
Hello world
</div>9 Replies
@Transvaal lion I would like to rewrite the style attribute of the code below for Next.js, but I'm having trouble figuring out how to do it.
I would appreciate it if you could help me
ts
<div className={`${styles['carousel-caption']} ${styles['d-flex']}`} style="position: absolute;top: 0px;left: 50%;width: 50%;height: 100%;"></div>
Atlantic horse mackerel
is there any specific reason why u're using tailwind classnames and native css styling?
@Atlantic horse mackerel is there any specific reason why u're using tailwind classnames and native css styling?
Transvaal lionOP
I write the style attribute because I want it to apply only to this tag.
Atlantic horse mackerel
so why not use tailwind to apply the styling to the specific tag?
Transvaal lionOP
I will try.
Atlantic horse mackerel
have you ever worked with react/tailwind before?
Transvaal lionOP
I've only used it for a little while, and I'm currently learning.
@Transvaal lion I would like to rewrite the style attribute of the code below for Next.js, but I'm having trouble figuring out how to do it.
I would appreciate it if you could help me
ts
<div className={`${styles['carousel-caption']} ${styles['d-flex']}`} style="position: absolute;top: 0px;left: 50%;width: 50%;height: 100%;"></div>
<div
className={`${styles['carousel-caption']} ${styles['d-flex']}`}
style={{
position: "absolute",
top: 0.
left: "50%",
width: "50%",
height: "100%",
}}
>
Hello world
</div>Answer
@Atlantic horse mackerel is there any specific reason why u're using tailwind classnames and native css styling?
as far as i can see they are not using tailwind