Zen Cart Logo
Forums / Upgrading from 1.3.x to 1.3.9 / 'Message' text area of 'Contact Us' wider than centerBoxWrapper specified width

'Message' text area of 'Contact Us' wider than centerBoxWrapper specified width

Views: 2,779

Results 1 to 5 of 5
26 Feb 2012, 5:45 AM
#1
isaiah36 avatar

isaiah36

Zen Follower

Join Date:
Jun 2006
Posts:
120
Plugin Contributions:
0

'Message' text area of 'Contact Us' wider than centerBoxWrapper specified width

Hello,

After upgrading from v1.3.7 to v1.3.9h the following page is not displaying right -

'Message' field too wide here
http://rastaheadwraps.com/index.php?main_page=contact_us

I had previously widened the default width of the site, while still running v1.3.7 but I don't know exactly what part of the stylesheet applies here

TIA

26 Feb 2012, 1:37 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,067
Plugin Contributions:
56

Re: 'Message' text area of 'Contact Us' wider than centerBoxWrapper specified width

I think that your issue is due to the way that Zen Cart handles CSS stylesheets. You have three (3) main stylesheets that are "in play":

/includes/templates/classic/css/stylesheet.css
/includes/templates/classic/css/stylesheet_new.css
/includes/templates/classic/css/stylesheet_original.css

They are all being loaded, thus the _original css file is taking precedence over your _new css file.

What you should do is to rename the stylesheet_original.css file to stylesheet_original.css.bak (so Zen Cart won't load it). I'd also suggest that you use something different than the "classic" template for your template overrides, since files in the "classic" folder will be overwritten when you upgrade.

26 Feb 2012, 10:36 PM
#4
isaiah36 avatar

isaiah36

Zen Follower

Join Date:
Jun 2006
Posts:
120
Plugin Contributions:
0

Re: 'Message' text area of 'Contact Us' wider than centerBoxWrapper specified width

Thanks for the reply, lat9! Renaming stylesheet_original.css has disastrous consequences to the layout, many things get broken, and it also didn't solve the problem of the message box width.

27 Feb 2012, 12:15 AM
#5
isaiah36 avatar

isaiah36

Zen Follower

Join Date:
Jun 2006
Posts:
120
Plugin Contributions:
0

Re: 'Message' text area of 'Contact Us' wider than centerBoxWrapper specified width

I don't understand PHP at all, but I decided to twiddle around with the tpl_contact_us_default.php file located in /includes/templates/template_default directory

I gave the 'fieldset' tag the 'centerBoxWrapper' class, and added / rearranged some line breaks with the 'clearBoth' class for a cleaner look - I also removed the red lettered alert text, because it was floating too far left with my revisions (customers mostly know what a red asterisk means) - here is my revised code for lines 48 - 78:

<br class="clearBoth" />
<legend><?php echo HEADING_TITLE; ?></legend>

<fieldset class="centerBoxWrapper" id="contactUsForm">
<br class="clearBoth" />

<?php
// show dropdown if set
    if (CONTACT_US_LIST !=''){
?>
<label class="inputLabel" for="send-to"><?php echo SEND_TO_TEXT; ?></label>
<?php echo zen_draw_pull_down_menu('send_to',  $send_to_array, 0, 'id="send-to"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
<br class="clearBoth" />
<br class="clearBoth" />
<?php
    }
?>

<label class="inputLabel" for="contactname"><?php echo ENTRY_NAME; ?></label>
<?php echo zen_draw_input_field('contactname', $name, ' size="40" id="contactname"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
<br class="clearBoth" />
<br class="clearBoth" />
<label class="inputLabel" for="email-address"><?php echo ENTRY_EMAIL; ?></label>
<?php echo zen_draw_input_field('email', ($email_address), ' size="40" id="email-address"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
<br class="clearBoth" />
<br class="clearBoth" />
<label class="inputLabel" for="enquiry"><?php echo ENTRY_ENQUIRY . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
<br class="clearBoth" />
<?php echo zen_draw_textarea_field('enquiry', '30', '7', $enquiry, 'id="enquiry"'); ?>

</fieldset>

here is the finished result, which works for me:
http://rastaheadwraps.com/index.php?main_page=contact_us

I hope this will help anyone having the same problem. Isn't open source just great? Thank you, Zen Team, for a very nice ecommerce software!