| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Centering page...please help!! | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I am trying to center my webpage (it's currently left aligned), and haven't been able to figure it out. From the forums, I've only been able to figure out that this is set in rectangle_top.tpl. So...my rectangle_top.tpl code is shown below. Please help!
{* $Id: rectangle_top.tpl,v 1.13.2.7 2005/09/06 11:07:44 max Exp $ *} { include file="common_js.tpl"} {if $config.Adaptives.isJS eq '' && $config.Adaptives.is_first_start eq 'Y'} <script id="adaptives_script" type="text/javascript" language="JavaScript 1.2"></script> <script type="text/javascript" language="JavaScript 1.2"> if (document.getElementById('adaptives_script')) document.getElementById('adaptives_script').src = "{$current_location}/adaptive.php?send_browser="+(localIsDOM?"Y":"N")+( localIsStrict?"Y":"N")+(localIsJava?"Y":"N")+"|"+l ocalBrowser+"|"+localVersion+"|"+localPlatform+"|" +(localIsCookie?"Y":"N")+"|"+screen.width+"|"+scre en.height+"|{$usertype}"; </script> {/if} <table class="okvir" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"> Thanks!! Jeff
__________________
X-Cart Gold - Version 4.0.19 |
|||||||
#2
|
|||||||
|
|||||||
![]() <table class="okvir" border="0" cellpadding="0" cellspacing="0" width="900" align="center">
Change the width to whatever you want
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() just add a css declaration to your okvir class:
margin: 0 auto; That should do it, there are several ways to do it though. I prefer css, hate tables.
__________________
Jason Diehl Finding Cures for Your Online Headaches: http://www.internetmedicineman.com/ |
|||||||
#4
|
|||||||
|
|||||||
![]() Add the colored text in home.tpl:
{include file=rectangle_top.tpl} <div align="center"> ..... ..... </div> {include file="rectangle_bottom.tpl" }
__________________
x-cart gold 4.1.3 on Linux/PHP 5.0.4/MySQL 4.1.20 |
|||||||
#5
|
|||||||
|
|||||||
![]() Heh...how many ways can we tell the poor guy how to center his page?
![]()
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#6
|
|||||||
|
|||||||
![]() IGC - That won't work because the table starts within rectangle_top.tpl and ends within rectangle_bottom.tpl All the code is going to do that you provided is center everything inside the table, and I believe that he wants the table itself centered on the page.
Balinor - haha, I didn't see your post until after I posted my reply. You are just too quick for me to keep up. ![]()
__________________
Jason Diehl Finding Cures for Your Online Headaches: http://www.internetmedicineman.com/ |
|||||||
#7
|
|||||||
|
|||||||
![]() Wow...that was fast!! Balinor's code worked perfectly....thank you all for the help!
Jeff
__________________
X-Cart Gold - Version 4.0.19 |
|||||||
#8
|
|||||||
|
|||||||
![]() At the risk of beating a dead horse...
I spoke too soon...my suggested fix above does not work in IE6, only in Firefox (text is centered in IE6). I found another fix. According to the author, it's cross-browser compatable. Add the colored text to line 2 in rectangle_top: ... <div class="centered"> <table class="Container" cellpadding="0" cellspacing="0" width="{$width|default:"100%"}"> And add this to line 21 in rectangle_bottom: ... </div> </table> Add this to skin1.css: div.centered { text-align: center; } div.centered table { margin: 0 auto; text-align: left; } igc
__________________
x-cart gold 4.1.3 on Linux/PHP 5.0.4/MySQL 4.1.20 |
|||||||
|
|||
X-Cart forums © 2001-2020
|