45 Posts
Jan
10 years ago
5
Topic
In the intro view I need a main-body width of 60% and a side-body width of 40%. I have tried to set that with "Positions: Label + Variations Width + Height", but that does not do anything. What am I doing wrong?
Get a VIP membership
45 Posts
Jan
10 years ago
4
Level 1
I have fixed it by adding an external style-sheet to cck.css with
.cck-w70 {width: 60% !important;}
.cck-w30 {width: 40% !important;}
For now this is a solution, but I wonder why setting the width of the main-body and the side-body does not give me any result. Am I missing something?
12 Posts
Fafi
10 years ago
3
Level 2
Hello Jan, first, excuse my english, I'm using google translate. I was able to do what you need with css and divs

css:
#cck {float:left;padding-left:0;width: 30% !important;}}
#cck2 {float:left;padding-left:3px;width: 22% !important;}
#cck3 {float:left;padding-left:3px;width: 47% !important;}
#cck4 {float:left;padding-left:3px;width: 66% !important;}
/* Headings & Titles ---*/
p1 { font-size: 2.2em; color: #333;}
p2 { font-size: 1.8em;}
p3 { font-size: 1.5em; text-transform:bold; color: #006600; }
p4 { font-size: 1.2em; text-transform: UPPERCASE; text-align: right;}
p5 { font-size: 1em;}
.contentheading,.componentheading,p1,p2,p3,p4,p5 { font-family: TeXGyreAdventorBold, Arial, sans-serif; font-weight: normal;}
#cck-content { border-top: 1px solid #E6E6E6; margin: 1em 1em 0; padding: 1em;}
#cck-content:hover { background: #ccc;}


mainbody.php:

<?php // No Direct Access defined( '_JEXEC' ) or die; ?>
<?php $items = $cck->getItems(); ?> <?php foreach( $items as $item ) { ?>
<div class="contentpaneopen clearfix"> (of template) <div id='cck-content'> <div id='cck'>
<?php echo $item->renderField('imagem_principal_do_imvel'); ?> </div>
<div id='cck3'> <p3><a href=<?php echo $item->getLink('art_title'); ?> </a>
<?php echo $item->getValue('art_title') ?> </p3> </div> <div id='cck2'>

<p4><?php echo $item->getLabel('valor'); ?><?php echo $item->getValue('valor'); ?></p4>
</div> <div id='cck4'> <?php echo $item->getValue('tipo_de_negocio'); ?> -
<?php echo $item->getValue('tipo'); ?> - <?php echo $item->getValue('novausada'); ?> -
<?php echo $item->getLabel('aceita_financiamento'); ?>
<div> <p3><?php echo $item->getValue('estado'); ?> <?php echo $item->getValue('cidade'); ?> <?php echo $item->getValue('bairro'); ?></p3> </div>
<div> <?php echo $item->renderField('quartos'); ?> <?php echo $item->getLabel('quartos'); ?>   
<?php echo $item->renderField('sute'); ?>
<?php echo $item->getLabel('sute'); ?>   
<?php echo $item->getValue('banheiros'); ?>
<?php echo $item->getLabel('banheiros'); ?>   
<?php echo $item->getValue('vagas'); ?>
<?php echo $item->getLabel('vagas'); ?>   
<?php echo $item->getValue('pavimentos'); ?>
<?php echo $item->getLabel('pavimentos'); ?></div>
<div> <?php echo $item->getLabel('area_construida'); ?>: <?php echo $item->getValue('area_construida'); ?>m²      
<?php echo $item->getLabel('area_total'); ?>: <?php echo $item->getValue('area_total'); ?>m²     
<?php echo $item->getLabel('posico'); ?>: <?php echo $item->getValue('posico'); ?>
</div> </div> </div> </div>
<?php } ?>

sorry if my codes are dirty, are the first to do. it returns me an image to the left, and right of the home information such as name, address and details
good luck!
45 Posts
Jan
10 years ago
2
Level 3
Fafi thanks for your contribution, but this is not what I mean.
4229 Posts
Kadministrator
10 years ago
1
Level 4
Hi,

you can set sidebody width in Template tab of your content type
45 Posts
Jan
10 years ago
0
Level 5

Yes, I have seen that. But.... why do we have the option to set "Positions: Label + Variations Width + Height". Is that just for cosmetic reasons or does it have e real function?

Get a Book for SEBLOD