Forums / Templates, Stylesheets, Page Layout / moving sideboxes around

moving sideboxes around

Started by familynow on 19 Aug 2011, 5:03 PM · Views: 1,920

Results 1 to 20 of 31
19 Aug 2011, 5:03 PM
#1
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

moving sideboxes around

Hi.

I recently installed crafty syntax and it's working well so far. I'm just wondering how to change the position of the sidebox.

I've read various posts on it but I can't seem to find a specific explanation/tutorial on how to position sideboxes in places other than their defaults. It would be nice to know for future reference. But in this case I want the box to go from the left column up by the shipping ad / currency boxes.

some bg info:

ZC 1.3.9h
CSLH 2.14.6

19 Aug 2011, 5:10 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,892
Plugin Contributions:
20

Re: moving sideboxes around

The layout boxes controller in the admin under Tools will help you maneuver the boxes. Just change left, right, or sort order as needed.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

19 Aug 2011, 5:26 PM
#3
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: moving sideboxes around

Yeah. I've already played with those...I can move the box by reordering with the numbers and do left/right but I want it up in the header beside the shipping and currency.

19 Aug 2011, 5:57 PM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,892
Plugin Contributions:
20

Re: moving sideboxes around

Perhaps a link to your site could help find an answer. Something like yoursiteDOTcom if you don't want the search engines to pick it up.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

19 Aug 2011, 6:05 PM
#5
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: moving sideboxes around

One way to place a sidebox in the header is to use absolute positioning. You can't change the width of that sidebox from the width of the others in that column, though.

19 Aug 2011, 6:09 PM
#6
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: moving sideboxes around

I read that somewhere but didn't understand which css file to edit and how to apply it in the div.

19 Aug 2011, 6:18 PM
#7
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: moving sideboxes around

I think the width limitation won't be a problem for this particular box.

19 Aug 2011, 6:25 PM
#8
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: moving sideboxes around

If the sidebox has (or can have) its own rule in the stylesheet, it would go something like this:

#sideboxname {position: absolute; left: XXpx; top: YYpx; }

where XX is the number of px from the left side of the header and YY is the number of px from the top of the header.

A link would let us advise more specifically.

19 Aug 2011, 6:27 PM
#9
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: moving sideboxes around

Yeah. That's about where I'm at. I can't figure out if that box can have an entry and in what file it would be called from.

19 Aug 2011, 6:31 PM
#10
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: moving sideboxes around

I found this in the tpl_craftysyntax_sidebox.php file. Would this be where I'd refer back to the css?

--More--
/div
...skipping
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="craftysidebox">';
$content .= '<script type="text/javascript" src="' . $cs_link . '"></script>';
$content .= '</div>';
?>

Sorry, this might be completely clueless of me...even after years of hacking around various sites I still don't get web design very much...

19 Aug 2011, 8:35 PM
#11
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: moving sideboxes around

Probably. The class is craftysidebox, so the rule would be .craftysidebox {etc.}

22 Aug 2011, 1:31 AM
#12
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: moving sideboxes around

Well, if you're stating that on the basis of what I pasted then possibly not...I added the class thinking It wouldn't be so hard to find the css to call it from. Unfortunately, I never did find the correct file.

22 Aug 2011, 10:25 AM
#13
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: moving sideboxes around

A link to the site would make it easy to figure out.

For future reference, install the Firefox browser and the Web Developer plugin for Firefox. You can use those to see where in the stylesheet you change the styling of the various page elements.

Ctrl-Shift-Y will allow you to hover over a section of the page and see the class and id names for that section in the box at the top. The statements in the stylesheet that begin with # are id's and the ones that begin with dots are classes.

Ctrl-Shift-E will open the CSS editor and allow you to edit the stylesheet and see the changes in real time without changing anything permanently. An essential tool.

Some prefer Firebug, which does much the same thing.

(If you're using Firefox 4, you'll need to remap the editor shortcut, since Firefox has appropriated Ctrl-Shift-E for an internal function - I use Ctrl-Shift-Q.)

22 Aug 2011, 3:25 PM
#14
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: moving sideboxes around

Sure. I'm just hesitant about the link because I don't want it out there since the site isn't going to reside at that URL. On that note, please don't copy or redirect anyone to this URL.

familynowDOTcaSLASHshop

So to reiterate, I'm trying to find a way to get the crafty syntax sidebox up by the currency/cart/shipping boxes with disrupting the rest of the template.

23 Aug 2011, 6:06 PM
#15
gjh42 avatar

gjh42

Black Belt

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

Re: moving sideboxes around

Add to the bottom of your stylesheet_tm.css:

#craftysyntaxsidebox {position: absolute; top: 100px; right: 46%;}

Adjust to taste.
You can also adjust the width of the sidebox by adding to that rule

width: 123px !important;

Again, adjust to taste.

25 Aug 2011, 1:36 PM
#16
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: moving sideboxes around

Perfect! Now I can just plant it wherever I want....Awesome.

Thanks to everyone who helped. I appreciate it very much.

25 Aug 2011, 10:52 PM
#17
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: moving sideboxes around

As it turns out the positioning only works perfectly for Chromium(I'm on Linux).

If I load up the page in FF or IE it's not in the same place at all.

Would it make a diff if I used % instead of px? ...What am I doing wrong?

26 Aug 2011, 12:05 AM
#18
gjh42 avatar

gjh42

Black Belt

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

Re: moving sideboxes around

% for height would probably not be a good idea, as the screen or page height will change. Your reference container is currently the entire window, so the horizontal position and possibly the vertical position are dependent on the browser. If you give #mainWrapper position: relative; the sidebox absolute position will be relative to the borders of that, and possibly more uniform in behavior.

26 Aug 2011, 12:13 AM
#19
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: moving sideboxes around

Like this?

/* ============== Crafty Syntax Sidebox =============================*/
#craftysyntaxsidebox {
position: absolute;
top: 45px;
right: 725px;
width: 130px !important;
}

#mainWrapper {position: relative;}

#craftysyntaxsidebox .box-head {display: none;}