[TYPO3] <h1> to <h3> with css_styled_content

Bas Heutink webdesign at inbalanshasselt.nl
Sun Jan 13 11:32:51 CET 2008


Hi Ryan,

I dont know if you can make typo3 change the tags set for header etc...
But with css you can achive the result you want.

The solution can be this:
Put your site title in a div and set this css:
#site_title h1

Then put the typo3 content in a div and set this css:
#content h1

This way it does not matter anymore that h1 is used twice.

Furthermore Typo3 adds classes to h1, h2 etc. tags, so you can style 
more specific, like:
#content h1.csc-firstHeader

Success!

Cheers, Bas



Ryan Holdren wrote:
> I am using tt_content and css_styled content to display my content for a
> template i am making. Its going good so far, I found some neat tricks for
> cleaning up the output and what I have looks something like this:
> 
> <h1>Test</h1>
> <p>Test</p>
> <h1>Test</h1>
> <p>Test</p>
> <h1>Test</h1>
> <p>Test</p>
> 
> Which is just how I want it except I need the h1's to be h4's (h1 is my site
> title, h2 is my subsite title and h3 is my page title, so h4 should be the
> subject headers).
> 
> How can I do this?
> 
> Thanks in advance,
> Ryan Holdren


More information about the TYPO3-english mailing list