Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can't get padding to take hold


surrfman

Recommended Posts

Posted

Run into a problem getting a padding command in the stylesheet to do as told.

 

Working with this page: http://www.discountegauges.com/product_info.php/vdo-vision-programmable-speedometer-437-153-p-33

 

Trying to get the h1 "VDO" to move in 40px along with the h2 "description statement" to move in 20px. Modified the line 136 of the stylesheet.css file as indicated by Firebug. It changes there, but a refresh and it goes back to no left side padding. Checked too make sure uploaded the modified .css file, it was uploaded. Tried using the margin command, same result.

 

Is there something overriding, any idea what and where to locate?

 

Thanks,

 

Timmy C

Posted

Hi Timmy,

 

Open your stylesheet.css

find the h1 { and add this

padding-left: 40px;

 

 

Open your catalog/product_info.php

Find:

<h1 style="float: right;"><?php echo $products_price; ?></h1>

Change to:

<span  style="float: right; font-size: 20px;"><?php echo $products_price; ?></span>

 

I'm not sure why 2.3.1 put the product_price in an h1 tag, there maybe a reason I don't know of, only thing I can think of is so its styled the same as the text. In any case because it is first floated right the padding or margin in the css won't work be its be over-written with the inline style float right. By taking it out of the h1 tag you fix that issue and your padding or margin left should work.

 

As for you H2 tag, you page doesn't have any h2 tags.

 

Hope that helps.

Posted

Tried the suggestion, no joy. Attempted several variations of the suggestion, same incorrigible outcome. Everything connected with h1 on other pages, just did not agree. Welcome any suggestions you can offer.

 

My mistake on the h2, confused with a different page.

 

Timmy C

Posted

One way to check for overriding issues in the stylesheet is to add something like this at the bottom of the stylesheet:

# bodyContent  h1{
padding:0px 0px 0px 10px
}

 

If that fixes it, and gives you a 10px left margin, then put that code halfway up the stylesheet and try again. If it still works just keeping moving it up until you 'bracket' the offending issue. Kind of like being in the artillery.

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Posted

Tried George's suggestion... can't be this difficult to get this thing to act as told. Tried moving the code up the file to see if it might decide to join the party, disappointed again.

 

Don, you know how it goes, test test test, then when you roll it out everything bites ya.

 

Gotta be an easy explaination...

 

Timmy C

Posted

Accidently found the cure! Used WinMerge to compare the current stylesheet to the unmodified back-up. Removed one of the padding calls, uploaded to server...shazzam!!! Gotta love a few misplaced characters sending us all into a frenzy!

 

 

Thanks guys for all your input,

 

Timmy C

Archived

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

×
×
  • Create New...