Fork me on GitHub






Blocs sur site
Semi pro
Inscrit: 01/11/2004 21:54
De Pres de Paris
Messages: 1099
Bonjour,

Est-il possible de faire en sorte que les blocs qui sont côte à côte soient chacun de la même longueur?

http://www.rythmes-croises.org/ethnotempos/

Merci d'avance.

Sylvie

Posté le : 04/12/2009 18:55
Partager Twitter Partagez cette article sur GG+
Re: Blocs sur site
Guest_
b'jour

Il faut recourir aux instructions css.

Il s'agit d'uniformiser la hauteur de tes blocs ou de leur largeur ?

Posté le : 04/12/2009 19:05
Partager Twitter Partagez cette article sur GG+
Re: Blocs sur site
Semi pro
Inscrit: 01/11/2004 21:54
De Pres de Paris
Messages: 1099
La hauteur. (pour l'instant, ça fait un escalier pas très beau)

Posté le : 04/12/2009 19:09
Partager Twitter Partagez cette article sur GG+
Re: Blocs sur site
Guest_
Je vois ça, c'est effectivement pas très esthétique.

La solution de facilité serait d'équilibrer autant que possible le contenu des blocs qui se font face. C'est à mon avis ce qu'avait en tête le créateur du thème ...

Si tu veux vraiment te lancer dans la modification du thème, voici les zones où intervenir :

• theme.html
<td id="centercolumn">
        <!-- 
Display center blocks if any -->
        <{if 
$xoops_showcblock == 1}>
        <
table cellspacing="0">
        <
tr>
            <
td id="centerCcolumn" colspan="2">
            <!-- 
Start center-center blocks loop -->
            <{foreach 
item=block from=$xoops_ccblocks}>
                <{include 
file="flower_k/theme_blockcenter.html"}>
            <{/foreach}>
            <!-- 
End center-center blocks loop -->
            </
td>
        </
tr>
        <
tr>
            <
td id="centerLcolumn">        
            <!-- 
Start center-left blocks loop -->
            <{foreach 
item=block from=$xoops_clblocks}>
                <{include 
file="flower_k/theme_blockcenter.html"}>
            <{/foreach}>
            <!-- 
End center-left blocks loop -->
            </
td>
            <
td id="centerRcolumn">        
            <!-- 
Start center-right blocks loop -->
            <{foreach 
item=block from=$xoops_crblocks}>
                <{include 
file="flower_k/theme_blockcenter.html"}>
            <{/foreach}>
            <!-- 
End center-right blocks loop -->
            </
td>
        </
tr>
        </
table>
        <{/if}>
        <!-- 
End display center blocks -->
        <
div id="content">
          <{
$xoops_contents}>
        </
div>
        <{if 
$xoBlocks.page_bottomleft or $xoBlocks.page_bottomright or $xoBlocks.page_bottomcenter}>
        <
table cellspacing="0">
        <{if 
$xoBlocks.page_bottomcenter}>
        <
tr><td id="bottomCcolumn" colspan="2">
            <{foreach 
from=$xoBlocks.page_bottomcenter item=block}><{include file="flower_k/theme_blockcenter.html"}><{/foreach}>
            </
td>
        </
tr>
        <{/if}>
        <{if 
$xoBlocks.page_bottomleft or $xoBlocks.page_bottomright}>
        <
tr>
            <
td id="bottomLcolumn">
                <{foreach 
from=$xoBlocks.page_bottomleft item=block}><{include file="flower_k/theme_blockcenter.html"}><{/foreach}>
            </
td>
            <
td id="bottomRcolumn">
                <{foreach 
from=$xoBlocks.page_bottomright item=block}><{include file="flower_k/theme_blockcenter.html"}><{/foreach}>
            </
td>
        </
tr>
        <{/if}>
        </
table>
        <{/if}>
      </
td>


• theme_blockcenter.html
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="blocks">
  <
tr>
    <
td><table width="100%"  border="0" cellspacing="0" cellpadding="0" >
      <
tr>
        <
td class="cornerTL">&nbsp;</td>
        <
td class="cornerTC">&nbsp;</td>
        <
td class="cornerTR">&nbsp;</td>
      </
tr>
    </
table></td>
  </
tr>
  <
tr>
    <
td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <
tr>
  <
td class="cornerCL"><img src="<{$xoops_imageurl}>images/flow_04.jpg" alt="" width="27" height="198" /></td>
  <
td class="cornerCC">
        <
div>
            <
div class="blockTitle"><{$block.title}></div>
                  <
img src="<{$xoops_imageurl}>images/1_line1.gif" width="200" height="8" alt="" />
            <
div class="blockContent"><{$block.content}></div>
       </
div>
        </
td>
         <
td class="cornerCR"><img src="<{$xoops_imageurl}>images/flow_06b.jpg" alt="" width="26" height="198" /></td>
     </
tr>
    </
table></td>
  </
tr>
  <
tr>
    <
td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <
tr>
        <
td class="cornerBL">&nbsp;</td>
        <
td class="cornerBC">&nbsp;</td>
        <
td class="cornerBR">&nbsp;</td>
      </
tr>
    </
table></td>
  </
tr>
</
table>


• style.css
#centercolumn {font-size: 12px;}
#centercolumn th {background-image: url(images/flower_05f.gif); color: #000000; vertical-align: middle;}

#centerCcolumn, #bottomCcolumn {padding: 3px 5px 1px;}
#centerCcolumn .blockTitle, #bottomCcolumn .blockTitle {padding: 1px;padding-left: 40px; color: #000000; font-weight: bold; margin-top: 0px; margin-right: 0px;  margin-left: 0px;font-size: 115%}
#centerCcolumn .blockContent, #bottomCcolumn .blockContent {padding: 3px; margin-right: 0px;  margin-left: 0px; margin-bottom: 2px; line-height: 120%;color: #000000}

#centerLcolumn, #bottomLcolumn, #centerRcolumn, #bottomRcolumn {
    
width50%; padding0px 3px 0px 5px;
}
#centerLcolumn .blockTitle, #bottomLcolumn .blockTitle, #centerRcolumn .blockTitle, #bottomRcolumn .blockTitle {
    
padding3pxcolor#000000; font-weight: bold; margin-top: 0px;font-size: 115%;padding-left: 40px;
}
#centerLcolumn .blockContent, #centerRcolumn .blockContent, #bottomLcolumn .blockContent, #bottomRcolumn .blockContent {
    
padding3pxmargin-left2pxmargin-right3pxmargin-bottom2px;color#000000 
}

...

.
cornerTL {background-imageurl(images/flow_01.jpg);height22px;width26px;
background-repeatno-repeat;background-positionleft;}
.
cornerTC {background-imageurl(images/flow_02.jpg);background-repeatrepeat-x;}
.
cornerTR {background-imageurl(images/flow_03.jpg);background-repeatno-repeat;
    
background-positionright;height22px;width26px;}

...

.
cornerCL {background-imageurl(images/flow_04s.jpg);background-repeatrepeat-y;
    
background-positionleft;width27px;vertical-aligntop;}
.
cornerCC {background-imageurl(images/flow_05.gif);background-repeatrepeat-x;
background-positiontop;}
.
cornerCR {background-imageurl(images/flow_06c.jpg);background-repeatrepeat-y;
    
background-positionright;width26px;vertical-aligntop;}



Voila ce qui se passe avec ce thème :
• les blocs sont contenus dans un tableau maître, transparent (laissant apparaître la couleur de fond noire du thème)
• l'imbrication des blocs se fait par série dans les cellules du tableau maître (par exemple tous les blocs Top-Left sont empilés dans la même cellule)
• l'étirement des cellules (balise <td>) provoque nécessairement l'étirement de la ligne du tableau (balise <tr>)
• la mise en forme graphique porte directement sur le bloc (template theme_blockcenter.html), qui lui même est un tableau. Il s'auto-ajuste donc au contenu.
• pour uniformiser les blocs, il faut au final faire porter la mise en forme graphique sur les cellules du tableau maître et non pas sur les blocs eux-mêmes.

Bref, il y a du boulot : il faut revoir en partie la conception du canevas.

Posté le : 04/12/2009 19:44
Partager Twitter Partagez cette article sur GG+

 Haut   Précédent   Suivant



Vous pouvez voir les sujets.
Vous ne pouvez pas débuter de nouveaux sujets.
Vous ne pouvez pas répondre aux contributions.
Vous ne pouvez pas éditer vos contributions.
Vous ne pouvez pas effacez vos contributions.
Vous ne pouvez pas ajouter de nouveaux sondages.
Vous ne pouvez pas voter en sondage.
Vous ne pouvez pas attacher des fichiers à vos contributions.
Vous ne pouvez pas poster sans approbation.

Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

40 Personne(s) en ligne (22 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 40 | Plus ...