Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Archived

This topic is now archived and is closed to further replies.

demastermind

Add Text to Header

Recommended Posts

Hello all! I am trying to edit the header.php to include te bussiness phone number dirrectly under the header short cuts and aligned with the margin. When I tried to do that with the below code I got this: http://bit.ly/lLErx1 (I did that so that google would not include this in the search results)As you can see, the number aligns with the header short cuts. How can I change it to align with the right side margin? Sorry if the answer is right in front of my nose, but I can't find it.

By the way the class "headerCallNumber" is this:

 

 

#headerCallNumber {
 float: right;
 margin-top: 60px;
 font-family:"Trebuchet MS", Helvetica, sans-serif;
 color:#000000; 
 font-size:28px;
}

 

------------------------------------------------------------------

 

header.php

 

<?php
/*
 $Id$

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2010 osCommerce

 Released under the GNU General Public License
*/

 if ($messageStack->size('header') > 0) {
   echo '<div class="grid_24">' . $messageStack->output('header') . '</div>';
 }
?>

<div id="header" class="grid_24">
 <div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></div>



 <div id="headerShortcuts">
<?php
 echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) .
      tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) .
      tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));

 if (tep_session_is_registered('customer_id')) {
   echo tep_draw_button(HEADER_TITLE_LOGOFF, null, tep_href_link(FILENAME_LOGOFF, '', 'SSL'));
 }
?>
 </div>



<script type="text/javascript">
 $("#headerShortcuts").buttonset();
</script>

[b]<div id="headerCallNumber">
000-000-0000 
</div>[/b]

</div>



<div class="grid_24 ui-widget infoBoxContainer">
 <div class="ui-widget-header infoBoxHeading"><?php echo '  ' . $breadcrumb->trail(' » '); ?></div>
</div>

<?php
 if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerError">
   <td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td>
 </tr>
</table>
<?php
 }

 if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerInfo">
   <td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td>
 </tr>
</table>
<?php
 }
?>


My Installed Contributions:

1. Ultimate SEO URLs V 2-2.2d-X

2. Quantity Box on Product Info Page

3. httpbl4osc Version 1.1.0

4. QTpro for osc 2.3

5. Header Tags SEO V 3.0 (For 2.3)

6. DHTML State Selection for 2.3.1

And Good To Know:

I use a 960gs fluid style sheet.

I do have a honey pot on my website.

Store Version: 2.3

 

“Pain is temporary. Quitting lasts forever."

- Lance Armstrong

Share this post


Link to post
Share on other sites

If you give me a suggestion (or code) on how to fix it, I will try it out on the store's page to see if it works. That should make this easier to do.


My Installed Contributions:

1. Ultimate SEO URLs V 2-2.2d-X

2. Quantity Box on Product Info Page

3. httpbl4osc Version 1.1.0

4. QTpro for osc 2.3

5. Header Tags SEO V 3.0 (For 2.3)

6. DHTML State Selection for 2.3.1

And Good To Know:

I use a 960gs fluid style sheet.

I do have a honey pot on my website.

Store Version: 2.3

 

“Pain is temporary. Quitting lasts forever."

- Lance Armstrong

Share this post


Link to post
Share on other sites

Okay, I figured out how to fix the problem. The answer was in the css. To get the text the right align with the page number, I simply changed the css to this:

 

#headerCallNumber {
 float: right;
 margin-top: 60px;
 font-family:"Trebuchet MS", Helvetica, sans-serif;
 color:#000000; 
 font-size:28px;
 clear:right;
}

 

Use this example if you find it helpful. If you use this to put the store phone number in the header, the customer will feel safer seeing and knowing that there is a way to contact the seller if needed. Opposed to it being out of view. It's psychology people!


My Installed Contributions:

1. Ultimate SEO URLs V 2-2.2d-X

2. Quantity Box on Product Info Page

3. httpbl4osc Version 1.1.0

4. QTpro for osc 2.3

5. Header Tags SEO V 3.0 (For 2.3)

6. DHTML State Selection for 2.3.1

And Good To Know:

I use a 960gs fluid style sheet.

I do have a honey pot on my website.

Store Version: 2.3

 

“Pain is temporary. Quitting lasts forever."

- Lance Armstrong

Share this post


Link to post
Share on other sites

×