Jump to content

Center datapages


Recommended Posts

I very much hope that someone will help me. I am still learning to find my way around Caspio Bridge.

I created a few datapages, but they all appear on the left side of the web browser. I would like to center all the pages in the web browser.

I spent days on working this out by modifying the default style, but have not succeeded at all.

Could someone help me? I would be very grateful.

Many thanks.

Link to comment
Share on other sites

I very much hope that someone will help me. I am still learning to find my way around Caspio Bridge.

I created a few datapages, but they all appear on the left side of the web browser. I would like to center all the pages in the web browser.

I spent days on working this out by modifying the default style, but have not succeeded at all.

Could someone help me? I would be very grateful.

Many thanks.

Hello Sylvie,

You can deploy the DataPage in a table that is centered on your web page.

Can you give me the URL so that I can take a look at it?

Link to comment
Share on other sites

  • 6 years later...

Caspio branding prevents from centering a page. So you need to

 

add an HTML block at the end of the list and have:

<input id="myAnhor" type="hidden" value=""  />

<script type="text/javascript">
   try {
      var v_parent = document.getElementById('myAnhor');

      while (v_parent.tagName.toUpperCase() != 'FORM') {
         v_parent = v_parent.parentNode;
      }

      if (v_parent) {
         var brandingTbl = v_parent.getElementsByTagName('table')[0];
         if (brandingTbl) { brandingTbl.style.cssText = 'width: 400px; margin: 0 auto;'; }
      }
   }
   catch (v_e) { }
</script>

then either add a Header/Footer:

 

in header: <div style="text-align:center">

 

in footer:  </div>

 

or in the style Forms/Deatils >> layout in Surce tab add text-align:center; to .cbFormOuterTable

 

I got this script from another forum post ;)

Link to comment
Share on other sites

  • 3 weeks later...
  • 6 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...