Results 1 to 10 of 10
  1. #1
    Join Date
    Jun 2006
    Location
    Providence
    Posts
    137
    Plugin Contributions
    0

    Default corners with images

    Is it possible to make rounded corners with only the stylesheet and not have to alter any .php files?

    I have tried with this:

    Code:
    div.sideBoxContent ul {
    	background-color: #CCCC99;
    	background: url(../images/corner_right.gif) no-repeat top right;
    	margin-top: 20em;
    	padding: 0.4em;
    	margin-right: 2em;
    }
    
    div.sideBoxContent.centeredContent {
    	background-color: #CCCC99;
    	background: url(../images/corner_right.gif) no-repeat top right;
    	margin-top: -0.1em;
    	padding: 0.4em;
    	margin-right: -0.02em;
    }
    
    div.sideBoxContent {
    	background: url(../images/corner_left.gif) no-repeat top left;
    	background-color: #CCCC99;
    	padding: 0.4em;
    	}
    These two do not work:
    • div.sideBoxContent ul
    • div.sideBoxContent.centeredContent


    Why is it that the UL tag doesn't work and the OL tag does?

  2. #2
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: corners with images

    What sidebox template are you working with?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Jun 2006
    Location
    Providence
    Posts
    137
    Plugin Contributions
    0

    Default Re: corners with images

    I'm working with my own CSS template.

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

    Default Re: corners with images

    We would need a link to your site to say for sure whether you can do this without adding any divs in the PHP files. Also, we need to know how much flexibility you are wanting. Will the sideboxes be a fixed width, or do you want the ability to change their width and have the corners keep pace?

  5. #5
    Join Date
    Jun 2006
    Location
    Providence
    Posts
    137
    Plugin Contributions
    0

    Default Re: corners with images

    I have the side boxes set at 150px. I can change them accordingly if need be. As long as I do not have to change any .php files I'm flexible. My reason is that I don't want to have to remember any .php customizations with every Zen Cart upgrade. I did that with my first version of this web site (2 upgrades ago) and do not want to go there again. It was a pain for me.

    Here is a link to my web site: http://www.seventhwindow.com/. FYI I publish M/M (I can't use the "g" word here) romance, I'm sorry if this offends you.

    Quote Originally Posted by gjh42 View Post
    We would need a link to your site to say for sure whether you can do this without adding any divs in the PHP files. Also, we need to know how much flexibility you are wanting. Will the sideboxes be a fixed width, or do you want the ability to change their width and have the corners keep pace?

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

    Default Re: corners with images

    As long as you decide on a width and keep it, any width will do.
    Your sideboxes are standard in their coding, so they can easily be styled with rounded corners and/or borders.

    Make a sample box image with all round corners, and cut it into top, middle and bottom sections.

    Put the general sidebox background color, or slice of image with side borders if desired, in
    .leftBoxContainer, .rightBoxContainer {
    background: #aabbcc url(../images/sbmidbg.gif) repeat-y;
    }

    Put the image with top round corners in
    .leftBoxHeading, .rightBoxHeading {
    background: #aabbcc url(../images/sbtopbg.gif) top center no-repeat;
    }

    Put the image with bottom round corners in
    .sideBoxContent {
    background: url(../images/sbbotbg.gif) bottom center no-repeat;
    }

    Adjust background colors and image names as desired.
    Last edited by gjh42; 23 Sep 2008 at 06:33 AM.

  7. #7
    Join Date
    Jun 2006
    Location
    Providence
    Posts
    137
    Plugin Contributions
    0

    Idea or Suggestion Re: corners with images

    OMG, doesn't that make sense! I was using two small image files for the corners, but since the side boxes are a specific width I just have to make one image file with that specific width and put it where I want.

    I'll let you know how it works out. I kind of feel silly for making it more complicated than it needed to be.

    Thank you for your help,
    Ken.

  8. #8
    Join Date
    Jun 2006
    Location
    Providence
    Posts
    137
    Plugin Contributions
    0

    Default Re: corners with images

    It worked! Now I just have to spruce up my image file and make it go live. I only want the corners on the top, so my code was very simple. I can't believe this is all I had to do. Here's my CSS.

    Code:
    div.sideBoxContent {
    	background: url(../images/corners.gif) no-repeat top left;
    	background-color: #CCCC99;
    	padding: 0.4em;
    }


    Thank you.

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

    Default Re: corners with images

    Looking good!
    You can get rid of the white "ghost" on the round corners by making the background color of the image (in Photoshop) the same light green as the box. Then when you cut the curve out of the dark green, the fractional pixels will go between dark & light green, not dark green & white.

  10. #10
    Join Date
    Jun 2006
    Location
    Providence
    Posts
    137
    Plugin Contributions
    0

    Default Re: corners with images

    Thanks fir the tip. I'll probably give it a whirl, but you have no idea how long it took me just to make the corners! I'm no artist.

 

 

Similar Threads

  1. Nifty Zen Template - Rounded Corners without images!
    By jettrue in forum Addon Templates
    Replies: 230
    Last Post: 23 Nov 2010, 07:15 PM
  2. How do I add rounded corners to the small "New Products" images on the home page?
    By cuiljoe in forum Templates, Stylesheets, Page Layout
    Replies: 16
    Last Post: 1 Apr 2010, 12:03 PM
  3. Table with round corners... border image doesn't show on page. Relative path issue?
    By stenio123 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 30 Jul 2007, 09:23 AM
  4. Make input fields with rounded corners
    By manage-it in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 10 Dec 2006, 05:35 PM

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