If this is your first visit, check our documentation. To post, register or login.

round corners

Locked

Started by oxicottin on 26 Aug 2007, 5:34 PM · Views: 20,004

Results 41 to 60 of 102
This thread is locked. New replies are disabled.
14 Sep 2008, 10:05 PM
#41
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

round corners

The default for background images is to repeat infinitely in both directions as far as the container goes. This may work fine for the center image, as long as it is at least as wide as the box. If it is a pixel or two narrower than the box, you will get a bit of the next copy at each side unless you limit it to repeat-y. Aside from that, we're doing exactly the same thing.

14 Sep 2008, 10:14 PM
#42
first_trading avatar

first_trading

Zen Follower

Join Date:
Aug 2008
Posts:
244
Plugin Contributions:
0

Re: round corners

Agreed, also gjh42 is spot on with what he says about the center boxes too.

You can get them looking exactly the same but with 2 images, header and like gjh42 said earlier with an image that is both the bottom and sides but with the sides set to a size you will never use............like 900 pixels or so.

This slides up and down the header to suit.

Now.............can anyone tell me how you get the shopping cart contents into a center box like we are describing.............

HELP...................

18 Dec 2008, 1:00 AM
#43
charagg avatar

charagg

New Zenner

Join Date:
Dec 2008
Posts:
45
Plugin Contributions:
0

Re: round corners

I've gone ahead and made the changes to my site's sideboxes using the snazzy round corners options suggested in this thread. However, I am using the logosidebox add on for some linked graphics throughout my site. Is there a way to apply the snazzy css styles to specific sideboxes? Right now, it is applying the style to all sideboxes. You can see what I mean at:

http://www.benchmarkdesign.net/index.php

Any help is greatly appreciated!

Thanks!

BenchmarkDesign.Net - Integrated Media Solutions

18 Dec 2008, 1:22 AM
#44
charagg avatar

charagg

New Zenner

Join Date:
Dec 2008
Posts:
45
Plugin Contributions:
0

Re: round corners

Also forgot to ask... anyone know how to remove the bottom background and leave the top backround color using the snazy rounded corners option? Please see my site referenced in my last post.

The css I have is as follows:

#xsnazzy h1, #xsnazzy h2, #xsnazzy p {margin:0 10px; letter-spacing:1px;}
#xsnazzy h1 {font-size:2.5em; color:#fff;}
#xsnazzy h2 {font-size:2em;color:#06a; border:0;}
#xsnazzy p {padding-bottom:0.5em;}
#xsnazzy h2 {padding-top:0.5em;}
#xsnazzy {background: transparent; margin:1em;}

.xtop, .xbottom {display:block; background:transparent; font-size:1px;}
.xb1, .xb2, .xb3, .xb4 {display:block; overflow:hidden;}
.xb1, .xb2, .xb3 {height:1px;}
.xb2, .xb3, .xb4 {background:#006699; border-left:1px solid #006699; border-right:1px solid #006699;}
.xb1 {margin:0 5px; background:#006699;}
.xb2 {margin:0 3px; border-width:0 2px;}
.xb3 {margin:0 2px;}
.xb4 {height:2px; margin:0 1px;}
.xboxcontent {display:block; background:#ccc; border:0 solid 
#08c; border-width:0 1px;}

Thanks

BenchmarkDesign.Net - Integrated Media Solutions

20 Jan 2010, 3:56 AM
#45
stiggy100 avatar

stiggy100

Zen Follower

Join Date:
Jan 2009
Posts:
298
Plugin Contributions:
0

Re: round corners

Useful information on this thread...

I've implemented the code outlined by Clyde on page one, however I seem to be getting an overlapped square corner, the rounded border is working just fine...

Would I need to post the code into another area of the tpl_main_page or is it an issue that can be fixed in css?

Anyone who might be able to think of a suggestion would be appreciated... Its clear to see the issue on my homepage at the link below, and I cant seem to make anything happen with firebug or web developer...

Steve

Steve
Site Under Construction: adatglobal.com

27 Jan 2010, 5:16 PM
#46
abs007 avatar

abs007

Zen Follower

Join Date:
Mar 2009
Location:
Peterborough UK
Posts:
330
Plugin Contributions:
0

Re: round corners

Hi im using the snazzy css code which can be found at the following url

http://www.cssplay.co.uk/boxes/snazzy2.html

I have added the coding to my stylesheet.css and also the html coding to

includes>templates>MYTEMPLATE>common>tpl_box_default_left.php

For some reason it has created a rounded sidebox container without a bottom boarder - However it hasnt changed the affect of the sidebox heading.

You can view it on my test site at the following url

http://www.buycheaplcdtvs.co.uk

Can anyone help me add the rounded corner affect to the sidebox heading please. Not too sure what ive done wrong.

For some reason the snazzy boarder has overwritten the css style for my sidebox container which was

.leftBoxContainer, .rightBoxContainer {
margin: 0em;
border: 2px none #0000CC;
border-right: 2px groove #2554C7;
border-left: 2px groove#2554C7;
border-bottom: 3px solid #2554C7;
border-top: 1px groove #2554C7;
margin-top: 1.5em;
}

I am presuming this is because i directly added the html coding to the tpl_box_default_left.php file

If I wanted to add extra css coding for the bottom boarder and the side boarders - fo example a color then would i now do this through the tpl_box_default_left.php file or the stylesheet.css file.

I have a feeling its included in the code which I pasted into the sylesheet.css which was as follows

.xsnazzy h1, .zsnazzy h1 {
margin:0; 
font-size:1.2em; 
padding:0 10px 5px 10px; 
border-bottom:1px solid #444;
}
.xsnazzy p, .zsnazzy p {
margin:0; 
padding:5px 10px; 
font-size:10px;
}
.xsnazzy {
background: transparent; 
width:240px; 
float:left; 
margin:0 3px;
}

.xtop, .xbottom {
display:block; 
background:transparent; 
font-size:1px;
}
.xb1, .xb2, .xb3, .xb4 {
display:block; 
overflow:hidden;
}
.xb1, .xb2, .xb3 {
height:1px;
}
.xb2, .xb3, .xb4 {
background:#fff; 
border-left:1px solid #444;
border-right:1px solid #444;
}
.xb1 {
margin:0 5px; 
background:#444;
}
.xb2 {
margin:0 3px;
border-width:0 2px;
}
.xb3 {
margin:0 2px;
}
.xb4 {
height:2px; 
margin:0 1px;
}

.xboxcontent {
display:block; 
border:0 solid #444; 
border-width:0 1px; 
height:auto;
}
* html .xboxcontent {
height:1px;
}

.color_a {
background:#c9ba65;
color:#fff;
}
.color_b {
background:#d4d8bd; 
color:#000;
}
.color_c {
background:#758279; 
color:#fff;
}
.color_d {
background:#b2ab9b; 
color:#000;
}

So I guess I will need to edit the colors - is this right?

Also should I cancel out the previous coding that I had for the sidebox containers which i have posted above or should I just leave it? The reason I am asking is so that browsers will not make any unwanted queries and cause the website to load slower.

I would prefer to use css coding then using an image so if there is a way to show the sidebox header as rounded then this will be great

thanks

Oh yeh I forgot to mention - for some reason the left sidebox container looks as if it is overlapping with the centerbox - not too sure why this is but the further you go down the page the more noticable it is

28 Jan 2010, 8:51 PM
#48
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: round corners

The "stepping" effect is due to each sidebox not being closed; therefore the next one is "inside" the previous one, and the left padding/margin is cumulative. You have (at least) four <div> and only two </div> per sidebox.

All colors and other styling information belong in the stylesheet.

29 Jan 2010, 3:53 PM
#49
abs007 avatar

abs007

Zen Follower

Join Date:
Mar 2009
Location:
Peterborough UK
Posts:
330
Plugin Contributions:
0

Re: round corners

gjh42:

The "stepping" effect is due to each sidebox not being closed; therefore the next one is "inside" the previous one, and the left padding/margin is cumulative. You have (at least) four <div> and only two </div> per sidebox.

All colors and other styling information belong in the stylesheet.

Hi thanks alot for the reply.

I added the extra 2 </div> tags and they worked - not sure if i added them right but i have posted the code below to show you what i done

<?php /** * Common Template - tpl_box_default_left.php * * @package templateSystem * @copyright Copyright 2003-2005 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: tpl_box_default_left.php 2975 2006-02-05 19:33:51Z birdbrain $ */ // choose box images based on box position if ($title_link) { $title = '<a href="' . zen_href_link($title_link) . '">' . $title . BOX_HEADING_LINKS . '</a>'; } // ?> <!--// bof: <?php echo $box_id; ?> //--> <div class="leftBoxContainer" id="<?php echo str_replace('_', '-', $box_id ); ?>" style="width: <?php echo $column_width; ?>"> <h3 class="leftBoxHeading" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><?php echo $title; ?></h3></div> </div> <div class="xsnazzy" id="<?php echo str_replace('_', '-', $box_id ); ?>" style="width: <?php echo $column_width; ?>"> <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b> <div class="xboxcontent"> <?php echo $content; ?> </div> <!--// eof: <?php echo $box_id; ?> //-->

I added the 2 div tags which are in red - i tried to place them in other places but it didnt seem to do the trick.

The only issue that I have now is that I need the sidebox headers to be rounded also. I have tried to cancel out the color and the original sidebox coding from the css file but it only removes the sidebox headers.

Any idea how i can get this done

The current sidebox header style is using the following code

.leftBoxHeading, .rightBoxHeading {
margin: 0em;
/background-color: #abbbd3;
background-image: url(../images/catbox.gif);
/
background-color:#2554C7;
padding: 0.8em 0.2em;
}

thanks

1 Feb 2010, 3:57 PM
#51
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: round corners

You have double-closed the box container immediately after opening it once and before opening the xsnazzy divs, so the total divs may be balanced, but the individual sideboxes will be totally wrong.
You need to close the xsnazzy divs just before the last </div> in the file:```php

<?php echo $content; ?> </div> ``````php <?php echo $content; ?> </div> </div> </div> ```
1 Feb 2010, 4:20 PM
#52
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: round corners

Alternatively, depending on how the xsnazzy code is intended to work, you might want to close the xsnazzy divs immediately after opening them both... or not:)


It appears that you have misplaced the xsnazzy code, as it is built to output the box id and thus to be the entire box container. You want something like this:```php

<!--// bof: <?php echo $box_id; ?> //--> <div class="xsnazzy" id="<?php echo str_replace('_', '-', $box_id ); ?>" style="width: <?php echo $column_width; ?>"> <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b> <h3 class="leftBoxHeading" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><?php echo $title; ?></h3> <div class="xboxcontent"> <?php echo $content; ?> </div><!--this closes the xboxcontent div--> </div> <!--// eof: <?php echo $box_id; ?> //--> ```The code that makes the rounded effect is ```html <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b> ``` and there should be something like```html <b class="xbottom"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b> ```to give the rounded effect for the bottom of the container. These will give a rounded effect to the overall container - above heading, below content - so if you want the whole heading and the whole content rounded, add "xbottom" and "xtop" code snippets between the <h3> and the content div.

Note: you need to check the original xsnazzy reference to get the correct syntax for the bottoms, and the CSS to apply to them.

1 Feb 2010, 4:38 PM
#53
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: round corners

And to address this comment:

"For some reason the snazzy boarder has overwritten the css style for my sidebox container which was

.leftBoxContainer, .rightBoxContainer {"

This is because your rewriting of the sidebox code eliminated the container classname from the div.
Use

<div class="xsnazzy leftBoxContainer" id="<?php echo...

You still may have conflicts between the particular border styling you show and the xsnazzy border, as that cannot display the groove correctly. If you want a grooved or other complex border with rounded corners, you will have to use images.

1 Feb 2010, 4:54 PM
#54
abs007 avatar

abs007

Zen Follower

Join Date:
Mar 2009
Location:
Peterborough UK
Posts:
330
Plugin Contributions:
0

Re: round corners

Hi Glen
Thanks again for your help.

I have made the required changes and have noticed a difference but still can not get it to work properly.

Heres my coding from the file

<!--// bof: <?php echo $box_id; ?> //--> <div class="xsnazzy" id="<?php echo str_replace('_', '-', $box_id ); ?>" style="width: <?php echo $column_width; ?>"> <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b> <h3 class="leftBoxHeading" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><?php echo $title; ?></h3> <b class="xbottom"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b> <div class="xboxcontent"> <?php echo $content; ?> </div><!--this closes the xboxcontent div--> </div> <!--// eof: <?php echo $box_id; ?> //-->

For some reason it just doesnt show up properly.

The blue sidebox header is still showing as a block without rounded corners and I cant seem to get the bottom boarder to show.

1 Feb 2010, 5:54 PM
#55
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: round corners

I looked at the blog post you referenced above, and it shows the top and bottom code, which is slightly different from my post. You need to use it as he shows for it to work correctly. Getting an image inside those rounded corners may be tricky, but if you are already using an image for the heading, why not make that with the round corners and just use it as is? In that case, you would only apply the xsnazzy <b> code to the content div.

1 Feb 2010, 7:16 PM
#56
abs007 avatar

abs007

Zen Follower

Join Date:
Mar 2009
Location:
Peterborough UK
Posts:
330
Plugin Contributions:
0

Re: round corners

Hi Glen
Thanks for all the help - you have really been very helpful.

We starting to get somewhere now - Ive had a look at the coding again and changed it.

Ive managed to get the bottom boarder and it looks good.

The only issue is the sidebox header. If you go to

buycheaplcdtvs.co.uk

you will see that the blue css color is there which is fine however when i remove it then the rounded affect is not complete as it doesnt give a bottom rounded boarder for the header part of the sidebox.

Also there is a brownish css color at the top of the blue sidebox header color. From what im gathering i think its to do with

.color_a

which is in the css and is referred to from the tpl_box_default_left.php

Also Xb1 and xb2 have the following css coding

.xb1 {
margin:0 5px;
background:#444;
}
.xb2 {
margin:0 3px;
border-width:0 2px;
}

I tried to remove the blue css color rule which i have for the current sidebox header and tried to increase the margin for the xb1 and xb2 but it goes out of proportion.

Also there is no spacing between the right sideboxes.

I have pasted the code below if you dont mind looking at it

<!--// bof: <?php echo $box_id; ?> //--> <div class="xsnazzy" id="<?php echo str_replace('_', '-', $box_id ); ?>" style="width: <?php echo $column_width; ?>"> <b class="xtop"><b class="xb1"></b><b class="xb2 color_a"> </b><b class="xb3 color_a"></b><b class="xb4 color_a"></b></b> <h3 class="leftBoxHeading" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><?php echo $title; ?></h3> <div class="xboxcontent"> <?php echo $content; ?> </div><!--this closes the xboxcontent div--> <b class="xbottom"><b class="xb4"></b><b class="xb3"></b> <b class="xb2"></b><b class="xb1"></b></b> </div> <!--// eof: <?php echo $box_id; ?> //-->

thanks

Sorry forgot to say that im not really bothered about the botton part of the sidebox header being rounded - i made a mistake. I would like it to look like electronicworldtv . co. uk/


Ive created a new rule for the left sidebox and removed the css coloring so you can see what I mean. If you look at the sponsered box on the left sidebox then you can see how the rest would look with the css color in it.

My left sidebox now has the following coding in the css

.leftBoxHeading {
margin: 0em;
padding: 0.8em 0.2em;
}

1 Feb 2010, 7:36 PM
#57
abs007 avatar

abs007

Zen Follower

Join Date:
Mar 2009
Location:
Peterborough UK
Posts:
330
Plugin Contributions:
0

Re: round corners

HI
I have sorted it in a weird sort of way.

I have re applied the css color to the sidebox heading and changed the

.color_a

to match the same color as the sidebox header

it works great just want you to check it to see if ive messed up the coding before i add it to my main site.

The only thing that I can not manage to do is to get the spaces between the sideboxes

your help will be appreciated and sorry if i keep posting here. I hope it will also help someone else

thanks

1 Feb 2010, 8:31 PM
#58
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: round corners

See post 53 for the spacing answer.
If you don't add back the leftBoxContainer class to the div, you need to add its properties to the .xsnazzy {} class rule.

1 Feb 2010, 8:49 PM
#59
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: round corners

abs007:

sorry if i keep posting here. I hope it will also help someone else
New threads on a specific titled topic allows others to locate previous assistance issues much easier

Zen-Venom Get Bitten

1 Feb 2010, 8:56 PM
#60
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: round corners

We are still talking about the effects of attempting to integrate the xsnazzy code in sideboxes...
If the subject and code involved is different, a new thread is warranted.