Topic on Project:Support desk

How to make font smaller in specific subcontent?

8
220.121.235.23 (talkcontribs)

I want to make the font size smaller of title and content in subcontent (which start with '=='). Can anybody tell me how to do it?

220.121.235.23 (talkcontribs)

I mean, for example, in my wiki, every article has subcontent with title of 'references'.

and I want to make the title (references) and content smaller in font size in every articles.

Malyacko (talkcontribs)

Define custom CSS for specific classes or IDs: Manual:CSS

220.121.235.23 (talkcontribs)

The problem is that one subcontent doesn't have class nor id. isn't is true?

Bawolff (talkcontribs)

you can wrap the entire section in a div:

<div style="font-size: 60%">
==References==
* foo
</div>
114.203.88.149 (talkcontribs)

I know this works, but it's really troublesome to type that in every article.

isn't there any way to make it automatically when the subcontent start with specific title (like '==References=='?

AhmadF.Cheema (talkcontribs)

The easiest way would be define the CSS style rules inside a template, and use that template whenever the ==References== section is to be included. See Help:Templates.

Jonathan3 (talkcontribs)

I wonder if you could use jQuery to change everything from the "References" heading to whatever comes next (eg another h2). Something similar is discussed on this Stack Overflow page.

Reply to "How to make font smaller in specific subcontent?"