Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need general webmaster help


Guest

Recommended Posts

Howdy!

 

Now that I have seen CSS stylesheets in action with Osc, I want to break out of the HTML blahs and create one for the main part of my site (ie. all the .html pages).

 

Am I able to have two stylesheets for one domain?

 

If so, how would you would do this? I want one stylesheet for the html pages of my site and then have the Osc stylesheet for the store (which is already alive and well and doesn't need changing).

 

Why am I just not using the Osc stylesheet for my html pages? Well, I don't want some things to happen in the html pages that do in the Osc pages. My html pages are not as snazzy as the Osc ones.

 

My html pages are all the informational stuffs and I have plans of having A LOT of pages and I really don't relish typing out the html codes.

 

Thanks in advance.

Link to comment
Share on other sites

You can have as many stylesheets for a site as you want. In each page, you specify which stylesheet you want it to use.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Jim,

 

That is what I thought, but I hadn't seen that written in black and white thus far in any of the tutorials, so I was wondering if one could or not.

 

Now, off to learn how to write one, based on what I already have on my html pages! Joy.

Link to comment
Share on other sites

It's fairly easy. As you might already know or have learned you have to add

 

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

 

To the top of each HTML page in order for the page to call the CSS. Now if you want to use a different CSS for different HTML pages then you would just name it something different. I.E. the one above and most common name is stylesheet.css. So if you want to create another for another page you would name it something like stylesheet1.css and when you add the link above to the head section to call the css page you would just change the name of the href to stylesheet1.css etc. link rel is always going to be named stylesheet though. Hope that helps some. Of course I am not sure why you would need mutiple stylesheets though.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

I have to agree ... stylsheets are to help you to create uniform pages, however sometimes you might need few... I have used for my last website few of them as I needed few related pages display differently... so I called them for example stylesheetwines, stylsheetspecials etc. But very seldom you need more than one stylsheet. Generally, you can use as many as you want but why then use CSS ?

Link to comment
Share on other sites

you can reduce the load time for pages by useing smaller CSS's, but you can use one CSS and make comments to breakuop your page like,

 

 

your OSC CSS

 

 

add a comment

 

your wines CSS

 

add a comment

 

your specials CSS

 

 

then just include the same CSS on each file

just use different class names to ensure you dont have any problems...

Thanks in advance!

 

Ben

Link to comment
Share on other sites

It would be better to use separate CSS files instead of a single compository file, especially if you plan to support Mac-based surfers.

 

Mac's have a slightly smaller font size than Windows-based surfers and therefore requires a larger font specification in the stylesheet.

 

For example, if a stylesheet specifies a font of 10px that will look nice on a Windows-based box but will actually be 8px on a Mac and practically unreadable.

 

Just something to keep in mind.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

IMO why cater to Mac users when they are few and far between. Just go build it around the the majority population which is Windows users. You also don't have to build a stylsheet for each page if one page only has a few styles. You can use an internal stylesheet and save the server space and load time if that is what you're concerned about. No need to have multiple stylesheets if some are only going to have a few styles per page and you are not going to duplicate styles from one page to another..

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

IMO why cater to Mac users when they are few and far between. Just go build it around the the majority population which is Windows users.

To each their own. ;)

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

They way I look at it is that is a disadvantage to the owning of a Mac and just something you have to deal with. Why go out of your way to make it Mac compatilble when you are already having to follow doctype standards. PC is the majority used. So I think I would want to follow the PC stardards as 97% of the users online use PC vs the 3% that browse online with Macs.

 

Just like if you buy a Ethanol powered car, you know your places to refuel is limited. So you buy a Mac and you know your web browsing experiance will be limited as well and not the same as it would be on a PC. So all in all, I wouldn't go out of my way for Mac users if it is going to compromise the quality for PC users and they make up the majority of the online browsing community.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

How does having a Mac-specific stylesheet compromise the quality for PC users?

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

How does having a Mac-specific stylesheet compromise the quality for PC users?

 

I think you have already answered your own question if you look back through your posts.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

IMO why cater to Mac users when they are few and far between. Just go build it around the the majority population which is Windows users.

Because a properly built, well-developed store should look great on all browsers and platforms - not just IE/Windows. There are *millions* of Mac users out there - you shouldn't casually dismiss such a large group of the Internet surfing community.

 

Fortunately OSC does a good job of being x-browser/platform compliant straight out of the box. I've never had to do much to a store to correct Mac issues.

Link to comment
Share on other sites

There are *millions* of Mac users out there - you shouldn't casually dismiss such a large group of the Internet surfing community.

 

Might wanna rephrase that and do some research. Their might actually be "Millions" of Mac users, but only 3% of those users use Macs online. Otherwise they are purchased and use for it's other capabilities that PC's can't perform to the task very well or not at all.

 

Because a properly built, well-developed store should look great on all browsers and platforms

 

I am more of referring to general web development and use of stylesheets. But you are right, a properly built store or web site should look great on all broswers but they don't. Reason being is because W3C doesn't hold their standards or performance based on a Mac, it's based on a PC. Therefor you can't get the same out come or presention using the W3C standards without going out of your way and depending on your browser without having proper site documentation it will send the browser of choice into quirks mode. Which is very common on Macs.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Reason being is because W3C doesn't hold their standards or performance based on a Mac, it's based on a PC.

 

It's got nothing to do with platforms (Windows or Mac) - it's the browsers on those platforms. If you are talking about making W3C compliant websites look right then instead of sounding off at Mac browsers which have made huge efforts recently to become W3C compliant - have a rant at Microsoft - they've been ignoring the W3C for years (and have done so again with the current beta release of IE7)!!

 

Of course Windows make up the vast majority of the internet surfing public, but just because IE has the biggest slice of the pie does not mean it is the best - or the most "right" when it comes to interpreting/ or rendering web pages.

Link to comment
Share on other sites

oooooooo Didn't mean to start a war guys! *grins*

 

By having "multiple stylesheets", I state again that there is one for the store (oscommerce stylesheet) and one for the html pages of my site. So only 2 total stylesheets. I don't know how to incorporate the osc shop look to the html pages of my site (which I had built long before I found osc) so hence why I wanted a separate stylesheet for the html pages of the site.

 

Since my original posts, I have learned loads and created a stylesheet and used it successfully on a small site I'm building for someone (only 4 pages). So, in the end, I have answered my own questions above ... I just need to learn more to get more comfy with this new skill.

 

I would love to learn php next in order to help me with my html pages of my site - there is only a half dozen now, but plan on expanding it alot and of course there are style elements that will carry through each page (navigation, header, footer, etc). Perhaps I can do that via the stylesheet, but I haven't quite figured that out yet.

 

Sorry for rambling here....Thanks for everyone's suggestions. I know I am WAY behind in experience and knowledge to most here, but one step at a time!

Link to comment
Share on other sites

there's no war - only a difference of opinion lol

 

If you already have a site then bringing OSC up to scratch is fairly straightforward. Take the common elements from your site such as logos, colors, fonts and styles and just work those into the existing OSC layout. This can be done through manipulating OSC's stylesheet and a few tweeks to the code. It's when you start hacking into and altering the layout of OSC that it gets more difficult.

Link to comment
Share on other sites

I would love to learn php next in order to help me with my html pages of my site - there is only a half dozen now, but plan on expanding it alot and of course there are style elements that will carry through each page (navigation, header, footer, etc). Perhaps I can do that via the stylesheet, but I haven't quite figured that out yet.

Have you considered using the same format as the shipping/conditions pages? It depends on what you your info pages are, and how you want them to look, but... I have a few info pages (about 10) that I created simply by duplicating the conditions.php page and renaming to a suitable name (e.g. 'classes.php'). Then I just changed the info on the inside (and you can use HTML, use the classes desfined in your stylesheet etc) to modify it. That way, when you click on an info page, for example 'classes.php', you keep all the formatting around it (like the categories box, etc and the header etc), with the content in the middle (just like what happens when you click on the 'shipping.php' page).

 

Hope this makes sense...

 

~bobsi18~

Link to comment
Share on other sites

It's got nothing to do with platforms (Windows or Mac) - it's the browsers on those platforms. If you are talking about making W3C compliant websites look right then instead of sounding off at Mac browsers which have made huge efforts recently to become W3C compliant - have a rant at Microsoft - they've been ignoring the W3C for years (and have done so again with the current beta release of IE7)!!

 

Of course Windows make up the vast majority of the internet surfing public, but just because IE has the biggest slice of the pie does not mean it is the best - or the most "right" when it comes to interpreting/ or rendering web pages.

 

Actually it has alot to do with platform because Mac can't run IE in the manner as it can on PC. IE for Mac hasn't been upgraded in 2 yrs. You are correct though, it is the browsers on these platforms that make the difference but I think that is the point I was making in my last post, but if the browsers render the code incorrectly between the two boxes then not much you can do about that. You're not telling me anything I don't know about IE not render HTML to WC3 standards correctly. Trust me I am not saying it's the best by anymeans, I use Firefox but anyone who deals with building web sites on a daily basis knows that just trying to make a site compatible between just those two browsers is a task alone, much less trying to make it compatible to the Apple Browsers and Opera for Mac. All I am saying is why go out of your way to make it Mac compatible when the majority users that browse the internet use PC. Because what looks right on a Mac might not look right on a PC and vice versa. Look at your referrer logs and it will tell you what platform and OS is hitting your site. I think to this date I haven't even hit 1% users from Mac. It might not be right for all browsers, but at the current time the only way to build a site to render correctly is by following the W3C standards. Which means Mac is SOL for the time being, but that's not the majority of publics fault for using PC. Just the way it is right now an not much you can about that right now.

 

 

-Moonlight:

 

About the double stylesheets, I wasn't aware in what manner you were using them in. In the way you described is fine. OSC can have it's own, and then your base website can have it's own. In fact it is probably better that way. I thought you were talking about have multiple stylesheets for OSC and that would just be silly to do...LoL. ABout the PHP, I would hold off and learn HTML first. The are two completely different languages. PHP is server side langauge which process functions and what not. They really have no control over design where HTML and CSS is an those are Client Side. Once you learn HTML or what's getting popular which isn't much different but a little fancier is XHTML with CSS. Once you learn HTML then you can learn how to embed PHP into your HTML. Good luck though. If your city is like mine the only courses they offer on Server Side Scripting is for ASP and not PHP. So you will be on your own to learn it the hard why which is reading the PHP manual and posting a lot of questions.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...