最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

customization - How do I modify the size of the text in my page titles?

programmeradmin2浏览0评论

Sorry for this basic question, but I'm having a hard time editing the size of text for the titles on the pages on my wordpress website. The html is below

<h1 class="hero-title"> COVID Visual </h1>

Sorry for this basic question, but I'm having a hard time editing the size of text for the titles on the pages on my wordpress website. The html is below

<h1 class="hero-title"> COVID Visual </h1>

Share Improve this question edited Mar 22, 2020 at 21:23 zach asked Mar 22, 2020 at 20:40 zachzach 1051 silver badge5 bronze badges 3
  • This really depends on your theme. Is it a custom theme, a theme that allows you to edit the title size in Customizer, a theme that has options that allows you to edit the title size, a theme that allows you to add your own CSS, or have you created a child theme that you can edit. It's usually good to provide a bit more info. – Tony Djukic Commented Mar 22, 2020 at 20:44
  • Thank you Tony. I chose the 'highlight' theme from my webhost. I've done some minor editing in the css files....just not sure how to do this one. – zach Commented Mar 22, 2020 at 21:07
  • Edit your question to include the HTML that outputs the title - you can just grab this using the developer tools console in your browser. Most pages use .entry-title or .page-title as the class for the title of pages and posts. So you'd be looking at something like .entry-title, .page-title { font-size:24px; } Obviously you'd use the font size units you pefer and adjust it to what size you want it to be, etc. – Tony Djukic Commented Mar 22, 2020 at 21:13
Add a comment  | 

1 Answer 1

Reset to default 1

In the CSS you want to set it like this:

h1.hero-title,
h2.hero-title{
     font-size: 24px;
}

Change the 24px to whatever size actually works for you.

发布评论

评论列表(0)

  1. 暂无评论