Topic: span tag inside h2 tag ?

In file post.php and some other files of 1.2, I see some codes like:

<h2><span><?php echo $lang_post['Post errors'] ?></span></h2>

I can't understand why there is <SPAN> tag inside a <H2> ? Anyone could explain me ?
Thanks

[no signature]

2

Re: span tag inside h2 tag ?

It provides more styling options e.g. you may want to use the sliding doors technique to give you rounded corners which requires two background images in which case you need two tags. Take a look at csszengarden, they use the same markup.

Re: span tag inside h2 tag ?

Ok, but in case of punbb 1.2 with style Oxygen here, when I removed all <span> tags I got the same layout smile

[no signature]

4

Re: span tag inside h2 tag ?

Of course. But the whole idea is that people can style PunBB to look like how they want without having to edit the php files. That means you have to provide enough markup for them to work with. Some people might come up with styles a lot more complicated than the default styles.

Re: span tag inside h2 tag ?

yes but with the <span> tags there are more possiblities, e.g. they don't affect the current style but allow more advanced styling