Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Aligning the New and Featured products on main page

Aligning the New and Featured products on main page

Views: 556

Results 1 to 7 of 7
9 Sep 2018, 3:39 AM
#1
joseph_m avatar

joseph_m

Zen Follower

Join Date:
Apr 2008
Posts:
150
Plugin Contributions:
0

Aligning the New and Featured products on main page

I have New and Featured products showing on my main page.

They are currently set to display in five columns.

I would like these products to center when there is not enough of them to fill the last row.

For example: If there are eight New items, I would like the last three to center under the first row of five.

However, I have not been able to make that adjustment in my override stylesheet.css.

Are the settings for those sections handled in another file? Thank you.

9 Sep 2018, 2:42 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Aligning the New and Featured products on main page

The easiest way for someone to advise about css layout is for them to be able to see the page that is question via a browser. Doing so allows review of the css files that are pushed to the browser and to not only provide a solution that would perhaps always center a row, but make adjustments unnecessary when the row is "full" or perhaps to marry the css and php to provide a tag only on the last row, etc...

Anyways, yes it is possible that the settings for those sections are handled or modified by another file. This is something you could likely answer yourself if you press the F12 key while viewing your webpage and use an option that reviews the css for the page.

9 Sep 2018, 4:33 PM
#3
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Aligning the New and Featured products on main page

mc12345678:

The easiest way for someone to advise about css layout is for them to be able to see the page that is question via a browser. Doing so allows review of the css files that are pushed to the browser and to not only provide a solution that would perhaps always center a row, but make adjustments unnecessary when the row is "full" or perhaps to marry the css and php to provide a tag only on the last row, etc...

Anyways, yes it is possible that the settings for those sections are handled or modified by another file. This is something you could likely answer yourself if you press the F12 key while viewing your webpage and use an option that reviews the css for the page.:P
Translation: The more posting tips you answer, the more help we can be to you.

9 Sep 2018, 7:32 PM
#4
joseph_m avatar

joseph_m

Zen Follower

Join Date:
Apr 2008
Posts:
150
Plugin Contributions:
0

Re: Aligning the New and Featured products on main page

.centerBoxContentsFeatured.centeredContent

Defaults to the left, and I can get it to float right. I just can't center it.

9 Sep 2018, 7:45 PM
#5
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Aligning the New and Featured products on main page

Sorry, that doesn't help. It could be anywhere. Can you not find the Posting Tips that show up each time you answer? Maybe a link to yoursiteDOTcom?

10 Sep 2018, 2:21 AM
#6
joseph_m avatar

joseph_m

Zen Follower

Join Date:
Apr 2008
Posts:
150
Plugin Contributions:
0

Re: Aligning the New and Featured products on main page

Thank you anyway, but I don't believe it is a stylesheet issue.
ZC wants to put these items in columns. The number of which is determined in the admin settings.
It will center if it hasn't filled all of it's columns. However, after doing so, it will place the next item in the first available column under the first row.
Apparently I can move it to the left or right, but it's still limited to the first available column... there is no centering it.
To even out those blocks of products, I've just set the maximum number columns, and then set the maximum number of products to show as a multiple of that number. Somewhat limiting, but an easy solution.

10 Sep 2018, 5:26 PM
#7
dbltoe avatar

dbltoe

Totally Zenned

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

Re: Aligning the New and Featured products on main page

In Excel running on windows, if I want to open a file, I can either use Ctrl+O or Alt-F-O keystrokes. I can also click on File, then Open. On a Mac, slightly different. The point being, simply opening a file in Excel can be done in more than one way.

The stylesheet can control every facet of an item to include color, height, width, left, right, center, top, bottom, etc, etc, etc. Sometimes, just adding a margin:auto call can center items in a div. Sometimes, even if an item is set to 5-wide and has only two elements, it can still be told to center itself. One could also change code to use a Flex Container.

Could be just as simple as adding align-content:center to the containing div.