sylvie Posted May 30, 2007 Report Share Posted May 30, 2007 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. Quote Link to comment Share on other sites More sharing options...
napoleonv Posted May 30, 2007 Report Share Posted May 30, 2007 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? Quote Link to comment Share on other sites More sharing options...
sylvie Posted May 30, 2007 Author Report Share Posted May 30, 2007 Thank you very much. I've been able to sort out the datapage centering. I am sure I'll have a few more questions on further details. Thanks again. Quote Link to comment Share on other sites More sharing options...
MayMusic Posted August 5, 2013 Report Share Posted August 5, 2013 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 Quote Link to comment Share on other sites More sharing options...
bahar_vm Posted August 24, 2013 Report Share Posted August 24, 2013 The easier solution does not need a JavaScript. Just place the following code in the header of the DataPage: <style>table {margin: 0 auto ;}</style> Quote Link to comment Share on other sites More sharing options...
MayMusic Posted August 26, 2013 Report Share Posted August 26, 2013 Thank you that is working awesome!! Quote Link to comment Share on other sites More sharing options...
BaySunshine Posted May 19, 2020 Report Share Posted May 19, 2020 The above code will not work for the new DataPages that have "Responsive" checkbox enabled. You can use the following instead for such pages: <style> div { margin: auto; } </style> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.