How to center text before first line break, after which it becomes left aligned

Hello,

I apologize if this is a stupidly simple request. I’m trying to edit the styling of my Cloze card type so that the text is center aligned, up until the first line break. After the first line break I would like it to appear as left aligned. I’m not sure if this is even possible in CSS. My coding knowledge is extremely limited, as I am a dental student using anki to study. Here is my current Cloze styling CSS code:

.card {
  font-family: "Courier New";
  font-size: 25px;
  color: black;
  background-color: white;
  text-align: center;
}

.cloze {
  font-weight: normal;
  text-decoration: underline;
  text-decoration-color: hotpink;
  color: hotpink;
}
.nightMode .cloze {
  font-weight: normal;
  text-decoration: underline;
  text-decoration-color: hotpink;
  color: hotpink;
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.