Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Making a new stylesheet.css


Guest

Recommended Posts

I'm lost, I'm looking in the file and I don't know what controls my new box. All the css in there control boxes that were already on the site when I installed it, but I have added a new box which I need to know how to add it's own css to the style file?

Link to comment
Share on other sites

Do I need to put the name of my new table to into stylefile?

 

try putting the contents of your new box inside a DIV tag and then create a new style in the stylesheet just for that.

 

If your new box contains some text like;

 

"Here is our personally select item of the week... blah.. blah.."

 

Try putting it in a DIV like this;

 

<DIV id="POTW">"Here is our personally select item of the week... blah.. blah.."</DIV>

 

By giving the DIV an "id" (POTW), you can reference it specifically in your stylesheet.

 

So open up "stylsheet.css" from the root of the shop folder and add a new style like this;

 

#POTW {

background:#333;

font-face: sans serif;

etc.. etc..

}

 

By using the "#" sign, you are telling the style sheet to apply this style to the item in the page that has an "id" of POTW. This means that all the default styles for the boxes will apply just as they do to all the other boxes, but everything within your DIV will follow the style set up in POTW. So if everything else in your box is fine as default and all you want to change is the size of your text, then just set the font-size in your new class and leave everything else unchanged.

 

Hope that helps,

 

Richard.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...