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 81 to 100 of 102
This thread is locked. New replies are disabled.
16 Feb 2010, 5:38 PM
#81
gjh42 avatar

gjh42

Black Belt

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

round corners

OK, looking at your results, I think I see how it needs to be coded. The whole heading needs to be inside the xsnazzy div.```php
} else {
$title = '<div class="xsnazzy">
<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><div class="xboxcontent"><h2 class="centerBoxHeading">
' . TABLE_HEADING_FEATURED_PRODUCTS . '</h2></div><b class="xbottom"><b class="xb4"></b><b class="xb3"></b>
<b class="xb2"></b><b class="xb1"></b></b></div>';
}

16 Feb 2010, 5:51 PM
#82
abs007 avatar

abs007

Zen Follower

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

Re: round corners

Cheers Glen,
I have changed the coding and its removed the old featured box heading. Theres just an issue with the size of the heading and it still pushes the container over to the side.

it might be something to do with the css. I pasted it earlier, i think its a page behind.

thanks

16 Feb 2010, 6:04 PM
#83
gjh42 avatar

gjh42

Black Belt

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

Re: round corners

Looks like it's almost there. You just need the xsnazzy bottom fill color, and the heading to stretch full width. Those can both probably be fixed in the CSS as you mention.

16 Feb 2010, 6:55 PM
#84
abs007 avatar

abs007

Zen Follower

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

Re: round corners

Hi Ive been playing with the css

I added width to the .centerBoxHeading i tried auto - inherit and 100% it only worked on the 100% but it would only stretch just out side the rounded box. not the full width.

I also tried to create a separate rule for the featureboxheading but that didnt work.

I really have no idea what to edit. The sideboxes worked easy - this is much more difficult.

If you have any ideas as to what I can edit then i would be ever so grateful. I have pasted the xsnazzy code below and also my CenterBoxHeading code

.centerBoxHeading {
margin: 0em;
	/*background-color: #abbbd3;
	background-image: url(../images/centrebox.gif);
	border: 7px groove #2554C7;*/
	background-color:#2554C7;
	padding: 1.0em 0.2em;
	}
.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;
padding-top: 1.5em;
}

.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:#2554C7;
color:#fff;
}
.color_b {
background:#d4d8bd; 
color:#000;
}
.color_c {
background:#758279; 
color:#fff;
}
.color_d {
background:#b2ab9b; 
color:#000;
}

thanks

16 Feb 2010, 7:16 PM
#85
gjh42 avatar

gjh42

Black Belt

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

Re: round corners

.xsnazzy {
background: transparent;
width:240px;

This sets all .xsnazzy elements to 240px wide, which is fine for sideboxes, but not for centerboxes. You need some more specificity:

.centerColumn .xsnazzy {
    width:100%; 
    }
16 Feb 2010, 8:13 PM
#86
abs007 avatar

abs007

Zen Follower

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

Re: round corners

Hi Glen
that worked just great - just a question - how did you know that the centerbox was referred to as centercolumn?

The heading is now full width however the container has been pushed all the way to the right and the images are actually being displayed out of the page.

16 Feb 2010, 8:29 PM
#87
gjh42 avatar

gjh42

Black Belt

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

Re: round corners

"how did you know that the centerbox was referred to as centercolumn?"

The Firefox Web Developer extension has tools that let you see all of the class/id tags that apply to an element and its ancestors and children.
.centerColumn was a good one, in the right location and just generic enough and specific enough at the same time.

To get the content to stay below the heading, add to your stylesheet

.centerBoxWrapperContents {clear: both;}

16 Feb 2010, 8:47 PM
#88
abs007 avatar

abs007

Zen Follower

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

Re: round corners

Wow
thats all I can say Glen - you certainly know your stuff. It worked great.

I am trying to add a rule to the stylesheet to get the bottom part blue. I tried it like the example below but it doesnt work.

.centerColumn .xbottom .xb1, .xb2, .xb3, .xb4 {
background-color:#2554C7;
}

Im not sure if i can combine them all together.

I also try to use the firefox plugin - i tend to use the information drop down on the toolbar and use the display element information. then i click on the area and try and make an estimated guess. I normally get it wrong though but sometimes it helps.

Im going to attempt the other centre boxes one at a time. Will I need to use the clear both method again - I guess i'll know when i get there.

16 Feb 2010, 8:57 PM
#89
gjh42 avatar

gjh42

Black Belt

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

Re: round corners

You can't string sub-selectors the way you were trying - they each have to be stated in full.

.centerColumn .xbottom .xb1, .centerColumn .xbottom .xb2, .centerColumn .xbottom .xb3, .centerColumn .xbottom .xb4 {
background-color:#2554C7;
}

16 Feb 2010, 9:08 PM
#90
abs007 avatar

abs007

Zen Follower

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

Re: round corners

I understand Glen, No shortcuts in coding :smile: thank you

Ive added the coding to all the other centre boxes. They all work great. The only one which was different was the specials_index.php file. it only had 1 <h2> tag.

If i wanted a rounded container then I presume this can only be done in the tpl_main_page file which I tried earlier but could not get it to work.

If i recall correctly we had th issue whereby the container was only half - which im suspecting is the 240px that we changed to 100% width for the centercolumn. Im temtped to give the container a go.

Is there a way to add the container through the tpl_main_page without touching the heading?

thanks

16 Feb 2010, 10:01 PM
#91
gjh42 avatar

gjh42

Black Belt

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

Re: round corners

Nope, it will not be possible to touch just the heading from tpl_main_page.php.
You will need to edit /includes/templates/your_template/templates/tpl_specials_default.php.```php

<h1 id="specialsListingHeading"><?php echo $breadcrumb->last(); ?></h1> ```
16 Feb 2010, 10:57 PM
#92
abs007 avatar

abs007

Zen Follower

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

Re: round corners

Hi
Im not sure I clearly understand what you mean.

I didnt mean the heading part of the centre box as weve just done this. What I meant to say was if it would be possible to add the centre box xsnazzy container from the tpl_main_page.php without affecting the centre box heading.

Hope it makes sense

19 Feb 2010, 10:28 AM
#94
abs007 avatar

abs007

Zen Follower

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

Re: round corners

Oops - Ive been away for a few days and was looking to get the site sorted. However I have noticed an issue with the rounded headers on the centre boxes.

They seem to show correctly on the main page however when you click through the pages they are all out of place.

Not sure if a clear all somewhere might sort this.

you can see what i mean on the following page

http://buycheaplcdtvs.co.uk/index.php?main_page=index&cPath=1&zenid=a3c5d92ba2fb65592c0225a16847defb

if you scroll down on the page you will also notice that the 100% width hasnt worked on some headings and the first centre box heading is not there

19 Feb 2010, 3:30 PM
#96
abs007 avatar

abs007

Zen Follower

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

Re: round corners

Hi Glen
Thanks for replying

I have pasted the heading codes below - they are parts of the stylesheet - copied and pasted below

h2.centerBoxHeading {
	font-size: 1.4em;
	color: #FFFFFF;
	}

/*sideboxes*/
.columnLeft {}

h3.leftBoxHeading, h3.leftBoxHeading a,
h3.rightBoxHeading, h3.rightBoxHeading a {
	font-size: 1em;
	color: #FFFFFF;
	}

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

.centerBoxHeading {
margin: 0em;
	/*background-color: #abbbd3;
	background-image: url(../images/centrebox.gif);
	border: 7px groove #2554C7;*/
	background-color:#2554C7;
	padding: 0.5em 0.2em;
	}


.centerColumn .xsnazzy {
    width:100%; 
    }

.centerColumn .xbottom .xb1, .centerColumn .xbottom .xb2, .centerColumn .xbottom .xb3, .centerColumn .xbottom .xb4 {
background-color:#2554C7;
}
19 Feb 2010, 4:00 PM
#97
gjh42 avatar

gjh42

Black Belt

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

Re: round corners

.centerBoxHeading and .centerColumn are generic enough that they should apply on every page. I don't know why the headings should work on the homepage but not others.

Looking at your page source, you have not applied the final corrected xsnazzy coding to all of the boxes:```html

<h2 class="centerBoxHeading"><div class="xsnazzy"> <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> <div class="xboxcontent">New Products For February - LCD TVs</div><b class="xbottom"><b class="xb4"></b><b class="xb3"></b> <b class="xb2"></b><b class="xb1"></b></b></div></div></h2> ```
19 Feb 2010, 4:11 PM
#99
gjh42 avatar

gjh42

Black Belt

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

Re: round corners

I recall that in standard Zen Cart coding, at least some of the centerboxes did not have a "content" div that could be used to clear the heading.
.centerBoxWrapperContents {clear: both;}

You might still have the same problem.

tpl_main_page.php is for all pages. There was a basic unfortunate choice of names at the beginning of the cart development, so that "main page" was used for the page structure as well as the home page - two entirely different things.

19 Feb 2010, 4:20 PM
#100
abs007 avatar

abs007

Zen Follower

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

Re: round corners

Hi glen
yeh we already have that in the stylesheet. I added it again but no luck.

Its kind of strange actually.

Im going to attempt to play with it later today.

Im not sure if you give commercial help. If you do then can I PM you

dont worry its not for this site

cheers