Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2006
    Location
    Fort Bragg, North Carolina
    Posts
    153
    Plugin Contributions
    0

    Default Trying to override the stylesheet on the index page only.

    I trying to change the background of my website but only for the index page. I understand that in order to do so, all I need is a css file on my template folder using the page name. Therefore I added an index.css to my css folder but it doesn't work.

    Is there something I'm missing? If I change that file's name to anything other than index.css i.e. contact_us, login etc.. works perfectly.

    Anybody has any idea what the issue is?

    Thanks

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Trying to override the stylesheet on the index page only.

    If you mean the home page, the name to use is index_home.css.

    There are some confusing double meanings and duplicate words for the same meaning built into the ZC structure - legacy code in action.

  3. #3
    Join Date
    Apr 2006
    Location
    Fort Bragg, North Carolina
    Posts
    153
    Plugin Contributions
    0

    Default Re: Trying to override the stylesheet on the index page only.

    That did it.

    THANKS

  4. #4
    Join Date
    Apr 2006
    Location
    Fort Bragg, North Carolina
    Posts
    153
    Plugin Contributions
    0

    Default Re: Trying to override the stylesheet on the index page only.

    Is there a way to modify the tpl_main_page.php only when viewing the home page? I don't want to modify the original too much with codes i.e. if this is home_page etc...

    I'm wondering if I can do this with a folder inside templates/MY_TEMPLATE/ named differently. I have tried placing a copy of the tpl_main_page.php inside a folder called. home, home_page, index_home but had no luck.

    Thanks for any help

  5. #5
    Join Date
    Sep 2007
    Posts
    20
    Plugin Contributions
    0

    Default Re: Trying to override the stylesheet on the index page only.

    Hmmm. I've put this in place because IE was ignoring inline CSS within define_main_page but it is being overridden by the Category style sheets. How can I stop the Category style sheets affecting the div on the main page's header?
    Last edited by googlepasta; 16 Mar 2009 at 12:39 PM.

  6. #6
    Join Date
    Sep 2007
    Posts
    20
    Plugin Contributions
    0

    Default Re: Trying to override the stylesheet on the index page only.

    OK so I've solved the problem with a horrible, horrible hacky work around but its working so what the hell. Besically I created a c_9.css which will always be the last to be read by pages like the home page. I don't have a category 9 so this works fine. I feel dirty but it got the job done.

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Trying to override the stylesheet on the index page only.

    That's really odd, because c_9.css will never be loaded by the home page (unless you have set it to open with category 9); neither will any other category-specific stylesheet. You may have something messed up with your code if that is really what is happening.
    Do a view source on the homepage and see what stylesheets are being called.

 

 

Similar Threads

  1. Trying to remove the Details button from featured products on the main page (only)
    By bodkin77 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 22 Jul 2013, 04:16 PM
  2. Flash header on the index page ONLY. jpg on the rest of the pages
    By perfectlyclearmedia in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 16 Aug 2008, 05:37 AM
  3. Trying to add custom HTML content to the index page only.
    By inthecomputer in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 23 Jun 2008, 11:04 PM
  4. What should be the name of the stylesheet so that it appears only for HOME PAGE
    By surabisantosh in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 22 Nov 2007, 08:59 PM
  5. I am trying to get 2 columns of categories on the index page.
    By member in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 12 Jul 2007, 12:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR