Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] center title #2008

Open
BrentHuang opened this issue Jun 4, 2024 · 2 comments
Open

[BUG] center title #2008

BrentHuang opened this issue Jun 4, 2024 · 2 comments
Assignees
Labels

Comments

@BrentHuang
Copy link

Describe the bug
A clear and concise description of what the bug is.

### 三级标题居中示例 {#三级标题居中示例 data-source-line="151"}

Environment

  • OS: Windows 10
  • VSCode: 1.89.1
  • Markdown Preview Enhanced: 0.8.1

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

三级标题居中示例

Markdown file
Please attach the markdown file that can reproduce the bug.
a.md

Screenshots
If applicable, add screenshots to help explain your problem.
image

Additional context
Add any other context about the problem here.

@BrentHuang
Copy link
Author

BrentHuang commented Jun 4, 2024

<center>**加粗的文字,并且水平居中**</center>
<center><u>加下划线的文字,并且水平居中</u></center>
<center>==标记的文字,并且水平居中==</center>

@Yue-Zhengyuan
Copy link

Yue-Zhengyuan commented Jun 10, 2024

You can center align the title by changing the CSS. Add the following lines to your style.less file:

h1, h2, h3, h4, h5, h6 {
    text-align: center;
}

Don't use the HTML <center> tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants