[Typo3] Wrapping content in <div> tags
Matthew Manderson
matthew at manderson.co.uk
Thu Dec 1 10:32:56 CET 2005
Ian
This is how I do it.
tt_content.stdWrap.dataWrap = <div class="cobject"> | </div>
OR
tt_content.stdWrap.dataWrap = <div class="cobject"></div> | <div
class="hr"></div><div style="height:10px;"></div>
WARNING
When you wrap a content object in a div like this, you can and will often
run into validation problems if another block level element gets split
across another block level object.
So go ahead if you need to but validate your code to identify and then fix
the problems.
Firefox is great it will screw up your code by adding new closing tags etc.
if your code does not validate.
I find using block level objects like this I need to clear them. So adding a
div afterwards that has clear:both in the css will stop these problems.
eg.
tt_content.stdWrap.dataWrap = <div class="cobject"> | </div><div class="hr"
style="clear:both;"></div>
Matthew
More information about the TYPO3-english
mailing list