function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Reshmi SmijuReshmi Smiju 

How to Align the Two page blocks in th Top Side of a Panel Grid


I am having an Issue. I want to allign two pageblocks in the Top Part of panel Grid. One a Pageblock contains some Search Parameters, and another is a page block contains Google Map.  Now, Serach Paramerts Page block coming in the Center Position of the Panel Grid .

User-added image

How to make it in the Top side , along the Google Map .
This is my Panel Grid Code
<apex:panelGrid columns="2" id="theGrid" width="100%" columnClasses="colstyle" style="vertical-align:top;" >
</apex: panelGrid>
Thanks in Advance
Chandra Sekhar CH N VChandra Sekhar CH N V
Try changing the 'columns' attribute to 1 instead of 2
Hi Reshmi,

You are using page block and in pageBlock there is no attribute like style or styleClasses. So we have to put css forcefully on that element. You can use either JQuery or Javascript. But for JQuery, you have to added its library. So better is to use Javascript. Put the following script in your code -
var allTdElement = document.getElementsByTagName('td');
for(var i = 0; i < allTdElement.length; i++) {
	var ele = allTdElement[i]; = 'Top';
This is vertically aligned your page block. Let me know in case of any Query.

Tarun Khandelwal,
SkypeId - tarun.khandelwal26 
Reshmi SmijuReshmi Smiju
Hi Tarun,
I have tried your code. But there no change to my layout.  :(
Hi Reshmi,

Please can you share your whole code so that i can give better solution?
Try this:

<style type="text/css">
        vertical-align: top;

Works for me! :)
Hannah Holbrook 1Hannah Holbrook 1
I am using Pageblock and can't get them to align with the code given above. do you put the code in above <apex:pageblock>?