Jump to content

Centering and equally spacing modules in Top Header


Recommended Posts

Hello Team,

I have installed and configured 4 modules to be in the Top Header hook. Each module is dynamic and it can have varying width. Currently I have them organized in the order I want them to be (in the Positions page). How can I have the right most module stay in the right most, the left most stay in the left - and the two modules in the middle to equally space out and center between the two side modules?

 

I would really appreciate any code examples.

 

Thank you.

Link to comment
Share on other sites

Hey,

I am using PS 1.5.4.1. Not default theme.

I have languages, currencies, social, and search modules in the top header. The two side modules are easily set with float left and right. But the center ones are the ones I was trying to equally space and center.

Thanks

Link to comment
Share on other sites

all you have to do is modify the .tpl files of modules you want to transplant to the header section.

 

add additional <div> box for each .tpl file,

you have to add to the <div> styles with:

 

display:inline-block;
float:left;
width:100px;

 

width - it isn't necessary but i added it as an example

 

what i mean by all of this?

 

<div style="display:inline-block; float:left">
MODULE 1 TPL CONTENT
</div>

 

<div style="display:inline-block; float:left">
MODULE 2 TPL CONTENT
</div>

 

<div style="display:inline-block; float:left">
MODULE 3 TPL CONTENT
</div>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...