Установить разную ширину двух столбцов в Visualforce?
Я хочу установить ширину двух столбцов (например, левый столбец 70% и правый столбец 30%). Как мне это сделать.
<apex:page>
<apex:panelGrid columns="2">
<apex:detail/>
<apex:outputText>Here come's the Image</apex:outputText>
</apex:panelGrid>
</apex:page>
1 ответ
<apex:page>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" ></script>
<apex:panelGrid width="100%" columnClasses="testcc" columns="2">
<apex:detail/>
<apex:outputText>Here come's the Image</apex:outputText>
</apex:panelGrid>
<script>
$(".testcc").each(function( index ) {
if((index % 2)==0)$(this).css('width','30%');
else $(this).css('width','70%');
});
<script>
</apex:page>