Page 1 of 3 123 LastLast
Results 1 to 10 of 27
  1. #1
    Join Date
    Oct 2007
    Posts
    64
    Plugin Contributions
    0

    Default Replicating this with CSS? -> Shadow, Roundcorner, Gradient

    I want my NavMainWrapper to look exactly like this.

    It is possible to replicate this 100% with CSS?







    Anti-Aliased Rounded Corners, Drop Shadow and preferably (but not imperative) a Gradient Fill.

    All without using ANY images whatsoever ??

    any CSS gurus out there got a simple solution? :)

  2. #2
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Replicating this with CSS? -> Shadow, Roundcorner, Gradient

    Quote Originally Posted by renaissanceart View Post
    I want my NavMainWrapper to look exactly like this.

    It is possible to replicate this 100% with CSS?







    Anti-Aliased Rounded Corners, Drop Shadow and preferably (but not imperative) a Gradient Fill.

    All without using ANY images whatsoever ??

    any CSS gurus out there got a simple solution? :)
    Solution: yes! simple: not really!

    You'll have to combine several css methods to accomplish what you want.

    Drop Shadow:
    Look at this tutorial

    Although it uses an image.

    The closest you'll get to a drop shadow without an image is to use a border-bottom declaration in your stylesheet.

    Rounded Corners:
    Look at this tutorial

    OR

    This one

  3. #3
    Join Date
    Oct 2007
    Posts
    289
    Plugin Contributions
    0

    Default Re: Replicating this with CSS? -> Shadow, Roundcorner, Gradient

    If it involves 4-5kb of js and css, why not just use a 2-3kb image directly. Images aren't evil. :-)
    Last edited by Nimbuz; 15 Nov 2007 at 10:06 AM.
    [FONT=Microsoft Sans Serif]CSS Evangelist[/FONT]

  4. #4
    Join Date
    Apr 2007
    Location
    Herts. UK
    Posts
    890
    Plugin Contributions
    4

    Default Re: Replicating this with CSS? -> Shadow, Roundcorner, Gradient

    Quote Originally Posted by Nimbuz View Post
    If it involves 4-5kb of js and css, why not just use a 2-3kb image directly. Images aren't evil. :-)
    Agreed. A couple of images set as sliding doors would be a lot easier to set up and maintain.

    Regards,
    Christian.

  5. #5
    Join Date
    Oct 2007
    Posts
    64
    Plugin Contributions
    0

    Default Re: Replicating this with CSS? -> Shadow, Roundcorner, Gradient

    Quote Originally Posted by CJPinder View Post
    Agreed. A couple of images set as sliding doors would be a lot easier to set up and maintain.

    Regards,
    Christian.

    Hmm whats this sliding doors method ?

    The problem i have is theres a complex textured background image. So the transparency in the shadow is neccessary. I can achieve this by saving the image as a PNG or Gif. But, the next problem i'm faced with is the rounded corners.

    Is this what your talking about with the sliding door? So have 3 images. 1 on each end which are rounded. Then a Centre image tiled ?

    I know i could do this in tables in a matter of seconds. Not sure about CSS?


    Thanks for the help guys, much appreciated!

  6. #6
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Replicating this with CSS? -> Shadow, Roundcorner, Gradient

    Quote Originally Posted by renaissanceart View Post
    Hmm whats this sliding doors method ?

    The problem i have is theres a complex textured background image. So the transparency in the shadow is neccessary. I can achieve this by saving the image as a PNG or Gif. But, the next problem i'm faced with is the rounded corners.

    Is this what your talking about with the sliding door? So have 3 images. 1 on each end which are rounded. Then a Centre image tiled ?

    I know i could do this in tables in a matter of seconds. Not sure about CSS?


    Thanks for the help guys, much appreciated!
    Check this article on the sliding door method

  7. #7
    Join Date
    Apr 2008
    Posts
    283
    Plugin Contributions
    0

    Default Re: Replicating this with CSS? -> Shadow, Roundcorner, Gradient

    I did some research on the sliding door method and a lot of the examples had to do with tabs which I am not interested in. Is this a lot of work for not a big thing lol. Does this template from zen cart us the same thing...sliding doors?

    http://(sorry, site offline)/138/ind...ate_dir=rustic

    This is all i am interested in. Is there an easy way to accomplish this task so it works with other resolutions. I guess I am just so confused on the sliding door method.

  8. #8
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Replicating this with CSS? -> Shadow, Roundcorner, Gradient

    Quote Originally Posted by welchyboy View Post
    I did some research on the sliding door method and a lot of the examples had to do with tabs which I am not interested in. Is this a lot of work for not a big thing lol. Does this template from zen cart us the same thing...sliding doors?

    http://(sorry, site offline)/138/ind...ate_dir=rustic

    This is all i am interested in. Is there an easy way to accomplish this task so it works with other resolutions. I guess I am just so confused on the sliding door method.
    Yes, it uses the sliding door technique for the navigations tabs, the sideboxes and the centerbox headings.

  9. #9
    Join Date
    Apr 2008
    Posts
    283
    Plugin Contributions
    0

    Default Re: Replicating this with CSS? -> Shadow, Roundcorner, Gradient

    WOW really...Well this is what I need to do I guess. I have looked at the tutorials but it really didn't help me much because it is talking about tabbed images or menus and I need something referencing the centerbox. Is there anyway i can get the information from like the rustic stylesheet. Will this information even help me. How can i go about getting this to work. I am just interested in getting the centerboxheading to work as an image of some sort but fit the box for multiple resolutions. Got any thoughts on how a newbie of css and zen cart can go about getting this to happen?

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

    Default Re: Replicating this with CSS? -> Shadow, Roundcorner, Gradient

    Just because the tutorial talks about tabs doesn't mean you need to use different methods for other elements. If it helps, mentally change "tab" to "heading".

    You will need another wrapper div to hold the second bg image. In /includes/modules/your_template/new_products.php, find this near the bottom:
    PHP Code:
        if (isset($new_products_category_id) && $new_products_category_id != 0) {
          
    $category_title zen_get_categories_name((int)$new_products_category_id);
          
    $title '<h2 class="centerBoxHeading">' sprintf(TABLE_HEADING_NEW_PRODUCTSstrftime('%B')) . ($category_title != '' ' - ' $category_title '' ) . '</h2>';
        } else {
          
    $title '<h2 class="centerBoxHeading">' sprintf(TABLE_HEADING_NEW_PRODUCTSstrftime('%B')) . '</h2>';
        } 
    and change to
    PHP Code:
        if (isset($new_products_category_id) && $new_products_category_id != 0) {
          
    $category_title zen_get_categories_name((int)$new_products_category_id);
          
    $title '<h2 class="centerBoxHeading"><span class="centerBoxHeadingWrapper">' sprintf(TABLE_HEADING_NEW_PRODUCTSstrftime('%B')) . ($category_title != '' ' - ' $category_title '' ) . '</span></h2>';
        } else {
          
    $title '<h2 class="centerBoxHeading"><span class="centerBoxHeadingWrapper">' sprintf(TABLE_HEADING_NEW_PRODUCTSstrftime('%B')) . '</span></h2>';
        } 
    Then you can attach one side of the bg to h2.centerBoxHeading and the other side to .centerBoxHeadingWrapper.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v154 Not sure how to go about this - "replicating shop"
    By samisoaps in forum General Questions
    Replies: 2
    Last Post: 23 Jan 2016, 01:20 PM
  2. v151 CSS button problem: gradient background with IE
    By su35 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 14 Jun 2013, 09:36 PM
  3. Can I do this with CSS
    By ThePatch in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 27 May 2007, 09:32 PM
  4. CSS drop shadow text
    By studeo in forum Templates, Stylesheets, Page Layout
    Replies: 14
    Last Post: 28 Jan 2007, 10:47 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