• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

code to center {module_product,176855,9862360}

Explorer ,
Dec 13, 2016 Dec 13, 2016

Copy link to clipboard

Copied

please advise on how to centre these modules

the below code approach isn't working  thank you

<div style="text-align: center;">{module_product,176855,9862360}<br />{module_product,176855,9970451}</div>

Screenshot 2016-12-14 12.19.37.png

TOPICS
Newbie Corner

Views

162

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 13, 2016 Dec 13, 2016

Copy link to clipboard

Copied

LATEST

Hi there,

CSS does not work like that. You do not need to use the div wrapping like that.

First of all you can give the wrapping div an ID or CLASS. Then you can target the child elements (The container for the small product layout you have) and then in your CSS stylesheet you can target that.

If your site is not responsive you can just give them a width for example and margin so that the margin looks something like this..

margin:10px auto 0 auto;

(Top Left Bottom Right)

Which will margin align elements central to that.

There are other methods but it will be based on the setup of your site code, the containers, how the sidebar is setup etc. Without a link that can only be guess work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines