Marzon Posted February 20, 2023 Share Posted February 20, 2023 (edited) I am unable to center my custom p4 text. It works with the normal paragraph, but not my p4. What can I do to fix this? EDIT: page: https://bear-conch-ebj2.squarespace.com/spring2023/project-one-ephnc-pnppe <p4 style="font-weight: bold;"> in • ter - con • scious<br> </p4> <p4 style="font-style: italic; font-weight: bold; color: grey">/inˈtər -ˈkänSHəs/<br> </p4> <p4>the situation or scene between competing desires or goals<br> </p4> In my css I have p4 { font-family: 'timesnr'; } Edited February 20, 2023 by Marzon added site link Link to comment
Solution ReformDesign Posted February 20, 2023 Solution Share Posted February 20, 2023 I think you just have to put it inside a parent element. <div style="text-align: center;"> <p4 style="font-weight: bold;"> in • ter - con • scious<br> </p4> <p4 style="font-style: italic; font-weight: bold; color: grey">/inˈtər -ˈkänSHəs/<br> </p4> <p4>the situation or scene between competing desires or goals<br> </p4> </div> Just curious, is there a reason you're not using text blocks? Link to comment
Marzon Posted February 22, 2023 Author Share Posted February 22, 2023 On 2/20/2023 at 1:18 PM, ReformDesign said: I think you just have to put it inside a parent element. <div style="text-align: center;"> <p4 style="font-weight: bold;"> in • ter - con • scious<br> </p4> <p4 style="font-style: italic; font-weight: bold; color: grey">/inˈtər -ˈkänSHəs/<br> </p4> <p4>the situation or scene between competing desires or goals<br> </p4> </div> Just curious, is there a reason you're not using text blocks? Ah, thanks! I understand now. I wasn't using text blocks because it's only specific instances I'm using this font/style. The rest of my site uses a different font, so I thought it made sense to do it this way. But if there is a better way to handle this please tell! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment