Print Page | Close Window

Having home.asp call a separate CSS file

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=3583
Printed Date: 19-July-2025 at 9:49pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Having home.asp call a separate CSS file
Posted By: BlackReefDesigns
Subject: Having home.asp call a separate CSS file
Date Posted: 01-April-2010 at 7:31pm
Hello,

Well the main content area of this page I'm working on has 5px padding.  This is perfect for the entire site - except we can't have this padding on the home.asp page.

On the home page, I would like '0' padding in this main content area

So what I was thinking was creating a separate header/footer.asp and naming them something like header_home.asp, footer_home.asp and have the home.asp call the new files instead of the regular header/footer.  Of course these new header/footer files would call their own stylesheet to have no <div> padding as desired, but that means if I need to update the static nav links or something, Id have to update the new header/footer_home.asp files and the regular header/footer files.

Another option I was thinking is I could just have the home.asp call a separate CSS file with the update padding dimensions, but it looks like the home.asp calls the header/footer which calls the stylesheet.

Is there any way to have the home.asp call it's own stylesheet or must it go through the header/footer files?

Hope that makes sense!

Maybe Im making this more difficult than it is, still learning!

Thank you very much for any help,
-J


-------------
Joe S.
BlackReef.net



Replies:
Posted By: ProductCart
Date Posted: 02-April-2010 at 1:55am
The simplest way to go is to slightly edit "home.asp" and change the name of the class used for that section of the page. You can then target the new CSS class in any existing CSS document used by header.asp (e.g. pcStorefront.css).

Locate:
<div class="pcPageDesc"><%=pcStrHPDesc%></div>

Replace with:
<div class="pcPageDescHomePage"><%=pcStrHPDesc%></div>

... then style your new "pcPageDescHomePage" CSS class.

-------------
The ProductCart Team

Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software


Posted By: BlackReefDesigns
Date Posted: 03-April-2010 at 3:04am
OK thank you for the response.  However, I couldn't quite figure out how to work your solution.  I updated the line in the Home.asp file and then added the new class to the pcstorefront.css, but the padding on the home.asp page was still there. 

Anyways, like I said, maybe Im making this more difficult then it is.

Unless I change the padding for the main content area on the entire site, the padding on the content pages is non-existant.  Atleast for the rest of the site (ex; product details pages) I can go in and add padding in the pcStoreFront.css to make the page look better.  With the content pages though, I cant edit the padding with the pcstorefront.css file, atleast I havent been able to find how to do it with the firefox web dev. tools.  Here is an example:
http://%20hendersondefense.com.mytempweb.com/store/pc/viewContent.asp?idpage=2 -
http://hendersondefense.com.mytempweb.com/store/pc/viewContent.asp?idpage=2 - http://hendersondefense.com.mytempweb.com/store/pc/viewContent.asp?idpage=2

Point being, is I think creating a separate home file separate from the rest of the site just for padding issues might be overkill.

When I use the CSS web dev. tools in firefox, it's not showing that the content pages have editable CSS (I would like to add 10 px padding on left, right sides)

In the past, Ive actually set the padding in PC's built in HTML editor when editing content pages, but I think this can be controlled somehow in a css file.

Plus Im still learning proper css so this is frustrating for me, lol.  Im sure its got to be a simple fix but I cant find it




-------------
Joe S.
BlackReef.net


Posted By: ProductCart
Date Posted: 03-April-2010 at 2:14pm
ProductCart assumes that it should fit 100% of the space allocated to it. We believe that any other assumption would be incorrect. That's because we do not want to make any decisions on your behalf on whether or not our content should fit tightly within your Web interface.

As a result, the padding should be set for the "container" DIV or TD. That is, the DIV or TD that you split when you create header.asp and footer.asp.

When you create those files, header.asp typically ends with the opening "<div>" or "<td>" tag (and footer.asp has the closing one). That's the interface element that you want to target to create padding around what the content that ProductCart will display.

Assign an ID (e.g. <div id="pcContentContainer">) to it and then target it in your CSS file.

We hope this helps.

-------------
The ProductCart Team

Home of ProductCart http://www.productcart.com" rel="nofollow - shopping cart software



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net