Project

General

Profile

Bug #14760 » workaround.css

Administrator Admin, 2005-05-27 19:07

 
/* Target: For Gecko-browsers and Opera we need to set margins to center the
imgtext-tables or float them according to the chosen position. To avoid messing
with IE, this can be achieved by using css-attribute selectors.

1. First we need to wrap the complete IMGTEXT-Object with a
position-specific class. This can be done by inserting the following
TS in your Setup:

tt_content.image.20.stdWrap.dataWrap = <div
class="imageorient-{field:imageorient}">| <div class="break"></div></div>

2. Now we are able to address the divs seperately in our CSS:*/

/* this centers images in Gecko/Opera */
div[class="imageorient-0"] table[class="imgtext-table"],
div[class="imageorient-8"] table[class="imgtext-table"] {
margin: 0 auto;
}

/* this right-aligns images above the text in Gecko/Opera */
div[class="imageorient-1"] table[class="imgtext-table"] {
float: right;
width: auto;
}
/* careful, sometimes other tags may follwow the table */
div[class="imageorient-1"] p {
clear: right;
}

/* this right-aligns images below the text in Gecko/Opera */
div[class="imageorient-9"] table[class="imgtext-table"] {
float: right;
width: auto;
}
// this avoids following content to float besides the images
div[class="imageorient-9"] div[class="break"] {
clear: right;
}

/*For the left-alignment, nothing has to be done as this initially was the
problem... ;-)*/
(1-1/5)