Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

stylesheet.css - have a question about usage


Recommended Posts

Hi, it's me again .....


Last week I asked about having multiple stylesheets per website. The answer was yes, I can have as many stylesheets as I wanted. Ok, fine.


Now I'm thinking the other direction ....


We have the stylesheet.css that is our cart/shop ....


Can I point my .html pages of my site to that stylesheet and it will work? Naturally, I would have to make sure everything matches in my .html pages codes to correspond .... Or would it just be easier and cleaner to made a separate stylesheet for my .html pages since they are much simplier in design ?


Basically - I do not like the look of my .html pages of my site and want those pages to look like my store. You're probably asking - why don't you make your store your main page of the site and just add pages like you would add an "about us" page ....


Well, I do not want the store as the main page of the site. So, that answers that LOL :P I like it just where it is.


Regardless of the best way to go on stylesheets - I have the Shadowbox contribution for the store - how can I use that in my .html pages? My .html pages do not have an ounce of php on them.


Just need advice from the more experienced crowd. It'll be a few days before I can dig into this and start messing around, but wanted to do some research and get advice so I know what i need to do.


Thanks in advance.


Note - please do not PM me about your web design services - you will just be reported if you do. (Sorry - every time I ask about web site design, I get those private messages! ARGH! ). I can't learn anything if I don't do it myself and I'm fully capable of learning new techniques and implementing them myself. Plus - I dont' have the money to pay anyone LOL. :P

Link to comment
Share on other sites

Do your html pages sit in the same root directory as your cart/shop?


If so, it would be an easy matter to just add the link to the stylesheet to your html pages by placing something like


<link rel="stylesheet" type="text/css" href="stylesheet.css">


in the head of the html pages.


If the html pages are not in the same root directory, I would suggest that you copy the stylesheet and put it in with your html stuff.


I guess that the question of whether to have all your CSS code on 1 sheet or multiple sheets is a matter of choice.


If you do want multiple sheets, you need to only call the 1 sheet within the html page as usual and call the other sheets from the original stylesheet with the addition of the following code placed on the original stylesheet


@import url(theothersheet.css)


Clear as mud eh? :blink:

Link to comment
Share on other sites

My html pages are just www.sites.com/page.html while my store is www.sites.com/catalog


I was thinking since my original post - what use would it be to use the store's css on my html pages if I am not able to use the header, footer, etc on my html pages ... since my html pages do not have php within them. Or am I able to pull in those elements of my store to my html pages?


Geez, wish I knew more about web design other than the basics. And none of the tutorials out there really answer my questions (and I"m talking about the big names in tutorials)

Link to comment
Share on other sites

It would appear that both the html files and oscommerce are in the same root directory


It is extremely easy to be able to put the header, footer, columns, etc into your html files using php. It is basically putting


<?php 'the link to the file' ?>


onto your html file where you want the header, footer, etc to appear.


It really is that simple.


If you are not using any of the styles in the oscommerce stylesheet, then it would not be necessary to use it. If you do, it would not be hard to give the path to the file or just copy it.

Link to comment
Share on other sites

Sweet - thanks for the help everyone.


I think I know the answer ... but if I add ANY php code to my html page, don't I need to rename the page .php?

Link to comment
Share on other sites

this code does not work <?php 'the link to the file' ?> No matter how I fiddle with the file name.


I even tried the W3C version: <?php require("header.htm"); ?>


Nothing shows up. I am putting this code between the trtd /tr/td tags.


Can someone post a snippet of a page code that pulls an element from osc, such as the left column (which is what I'm trying to do), and place it among html code? Maybe I am missing something obvious.

Link to comment
Share on other sites


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

  • Create New...