coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: Gizmo on October 17, 2006, 01:53:07 AM

Title: Setting Main Table Width in theme.php
Post by: Gizmo on October 17, 2006, 01:53:07 AM
I need to make sure the main table width in a new theme I've nearly finished (WordPress K2) is set to 100% so I set $CONFIG['main_table_width'] = 100% in the theme.php file but of course this gives an error when loading because of the % sign. I can't set it to an absolute width because IE screws this up because of the padding and adjusting a style specifically for IE just isn't cutting it. Is there a way to set it to 100% in the theme.php?

Thanks,

Gizmo
Title: Re: Setting Main Table Width in theme.php
Post by: Nibbler on October 17, 2006, 01:57:07 AM
$CONFIG['main_table_width'] = '100%';
Title: Re: Setting Main Table Width in theme.php
Post by: Gizmo on October 17, 2006, 02:05:39 AM
Oh Bloody Hell!!! Thanks Nibbler.  :)
Title: Re: Setting Main Table Width in theme.php
Post by: Joachim Müller on October 17, 2006, 07:52:20 AM
Just for clarification: in PHP, you don't have to explicitely set the type of a variable/array/object (boolean, integer, float, string ), so you can't judge just by looking at the name of which type $CONFIG['main_table_width'] is. When assigning a string to a var, you need to put it into quotes ($foo = 'bar' or $foo = "bar"). When assigning boolean ($foo = TRUE), integer ($foo = 5) or float ($foo = 3.1415) to a var, you don't necessarily need to put them into quotes. However, to stay save, you may put them into quotes - $foo = '5' is fine.
Details: http://www.php.net/manual/en/language.types.php