Results 1 to 9 of 9
  1. #1
    Join Date
    May 2007
    Posts
    70
    Plugin Contributions
    0

    Default How to implement an external stylesheet for my menu?

    I want to create a nice horizontal menu, I've created the stylesheet for it, but how do I implement that? Is there html I need to add to a file to specify where I want the menu to show and link it to the external stylesheet?

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,706
    Plugin Contributions
    12

    Default Re: How to implement an external stylesheet for my menu?

    If you want the menu in the header, just add the code to the header.php and add the css to the end of stylesheet.css. Make sure you don't have conflicting IDs in the css
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

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

    Default Re: How to implement an external stylesheet for my menu?

    Are none of the horizontal dropdown menu mods in Free Addons suitable? It would probably be easier to use or adapt one of those than to start from scratch building a new menu.

    You can add the styling rules directly to /includes/templates/your_template/css/stylesheet.css, rather than making a new CSS file.

  4. #4
    Join Date
    May 2007
    Posts
    70
    Plugin Contributions
    0

    Default Re: How to implement an external stylesheet for my menu?

    Thank you I'll try out one of the mods.

  5. #5
    Join Date
    May 2007
    Posts
    70
    Plugin Contributions
    0

    Default Re: How to implement an external stylesheet for my menu?

    Ok I tried a few things but it just wasn't giving me what I wanted.

    I've created a menu based on the tutuorial here: http://www.webdesignerwall.com/tutor...nced-css-menu/

    and have all the info entered in the stylesheet.css

    What I'm not understanding though, is what file to put this code in, and where in the file to put it?:

    HTML Code:
    <ul id="menu">
      <li><a href="#" class="home">Home <span></span></a></li>
      <li><a href="#" class="about">About <span></span></a></li>
      <li><a href="#" class="contact">contact <span></span></a></li>
    </ul>
    Also when I enter all my menu info in the stylesheet.css
    (i.e. #menu, #menu span, etc) do I put it just under this part
    in the code if I want my menu to show just under the
    logo wrapper?:


    PHP Code:
    #logoWrapper {
    background-color:#1F0D00;
    background-image:url(../images/ngheader_bg.gif);
    bordernone;
    height:400px;


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

    Default Re: How to implement an external stylesheet for my menu?

    The location of the rules in the stylesheet will not affect the position of the output on the screen. The one relevant aspect is that specific rules that apply to only one of a set of elements should go after general rules that apply to the whole set of elements.

    If you want your menu to appear in the header, you would put your HTML/PHP code in /includes/templates/your_template/common/tpl_header.php.

  7. #7
    Join Date
    May 2007
    Posts
    70
    Plugin Contributions
    0

    Default Re: How to implement an external stylesheet for my menu?

    Thank you so much for taking the time to help. I am however still running into one problem. I don't know if it's my positioning or what, but only the Home button is showing and not the others (and it's linking to the 'Our Scents' page instead of the page it's supposed to).

    The site is www.zingslings.com/awe and it's all in the stylesheet.css

    This is the info I have in my tpl_header.php file:


    PHP Code:
    <ul id="menu">
      <
    li><a href="/awe/index.php?main_page=index&cPath=5" class="scents">Our Scents <span></span></a></li>
      <
    li><a href="/awe/index.php?main_page=index&cPath=4"" class="baby">Baby <span></span></a></li>
      <li><a href="
    /awe/index.php?main_page=product_info&cPath=1&products_id=1" class="bath">Bath <span></span></a></li>
      <li><a href="
    /awe/index.php?main_page=index&cPath=2" class="body">Body <span></span></a></li>
      <li><a href="
    /awe/index.php?main_page=index&cPath=3" class="home">Home <span></span></a></li>
    </ul> 
    If anyone can tell me where I went wrong it would be greatly appreciated. It took me 2 hours tonight just to get to this point.

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

    Default Re: How to implement an external stylesheet for my menu?

    HTML Code:
    <li><a href="/awe/index.php?main_page=index&cPath=4"" class="baby">
    You have an extra " after the 4.
    HTML Code:
    <li><a href="/awe/index.php?main_page=index&cPath=4" class="baby">

  9. #9
    Join Date
    May 2007
    Posts
    70
    Plugin Contributions
    0

    Default Re: How to implement an external stylesheet for my menu?

    Thank you all so much for the help :) I have it working beautifully now thanks to this forum.

 

 

Similar Threads

  1. Best way to implement external image server?
    By qhome in forum General Questions
    Replies: 13
    Last Post: 17 Dec 2009, 05:18 PM
  2. How to properly implement jscript_*.php file for main page?
    By webwiz in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 19 Oct 2009, 01:49 AM
  3. Help, need to implement a css menu
    By niffy in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 3 Jun 2009, 04:16 PM
  4. help implement scrip to load stylesheet depending on the user's screen resolution
    By abel2b in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 2 Apr 2009, 01:53 AM

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