Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

V2.3.1-Can't style product_info with stylesheet.css?


Recommended Posts

I am trying to style the $product_price in the product_info.php with the help of stylesheet.css.

However, no matter what css parameters are given to the id's, there is no change in page, nor when viewing the parameters with firebug?

 

5690933549_11e0c2ae26_m.jpg

In the imge above the price is now floating at the left hand side.

 

The objective is to get this to float on the righthand side and use some jquery to make it fixed/float along the right hand side of the middel section.

The code for this is in the following post:http://jqueryfordesigners.com/fixed-floating-elements/

 

My code I have added to product_info.php (extra div's to style the pricing as a right-column, an outer div to position:relative so that the inner can be position:fixed.

<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>

[color="#FF0000"]<div id="dntpriceouter">

 <div id="dntprice">
 	<h1 id="display_price";><?php echo $products_price; ?></h1>
 </div>
</div>[/color]

<div class="contentContainer">
 <div class="contentText">
	<div id="dntproduct">
 		<h1><?php echo $products_name; ?></h1>
 	</div>
<?php
   if (tep_not_null($product_info['products_image'])) {
     $pi_query = tep_db_query("select image, htmlcontent from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$product_info['products_id'] . "' order by sort_order");

     if (tep_db_num_rows($pi_query) > 0) {
?>

   <div id="piGal" style="float: right;">
     <ul>

 

The css added below to te stylesheet.css

#dntpriceouter { 
  left: 450px;
  position: absolute;
  margin-left: 35px;
  width: 280px;
}
#dntprice {
  position: absolute;
  top: 0;
  /* just used to show how to include the margin in the effect */
  margin-top: 20px;
  border-top: 1px solid purple;
  padding-top: 19px;
}
#dntprice.fixed {
  position: fixed;
  top: 0;
}

 

So, the question is, why is this not reacting to the css styling?

(also noticed that I can use in-line styling on the various sub-prices which come from another file. That is the only thing that works?)

 

Thanks in advance for the help.

Edited by DirkTromp
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...