Zen Cart Logo

center Header Title

Views: 1,064

Results 1 to 8 of 8
26 Jul 2012, 1:39 AM
#1
mlapage avatar

mlapage

New Zenner

Join Date:
Jun 2012
Posts:
21
Plugin Contributions:
0

center Header Title

I am looking for an 'easy' way to center the title on a banner and header bar. If you look at the home page http://www.mimirbooks.com/ bottom of center section, you will see the selectible "Top Offers" and the header bar "Mimir Books Online - ...". These are the the two titles to center. I would greatly appreciate any help on this.

header bar code (tpl_main_page):

<div class="bot-banners"> <h3 class="title">Mimir Books Online - Quality at the right price!</h3> <!-- BOF- BANNER #3 display --> <?php if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) { if ($banner->RecordCount() > 0) { ?> <div id="bannerThree"><?php echo zen_display_banner('static', $banner);?></div> <?php } } ?> <!-- EOF- BANNER #3 display -->

banner code (tpl_main_page):

<?php if($this_is_home_page){ ?> <div class="banners"> <ul class="tabs2"> <li><a href="#tab4">Clearance Zone</a></li> <li><a href="#tab5">Orders</a></li> <li class="last"><a href="#tab6">Top Offers</a></li> </ul>

Thanks
Mike

26 Jul 2012, 8:55 AM
#2
ivan999 avatar

ivan999

New Zenner

Join Date:
Jul 2012
Posts:
3
Plugin Contributions:
0

Re: center Header Title

Modify this in stylesheet_tm.css (line 683) to center Mimic....

.bot-banners div {
    float: left;
    text-align: center;
    width: 100%;
}

and to center Top offers, give a width to ul.tabs2 li.last and add text-align center in css.

Hope this helps.

26 Jul 2012, 3:14 PM
#3
mlapage avatar

mlapage

New Zenner

Join Date:
Jun 2012
Posts:
21
Plugin Contributions:
0

Re: center Header Title

Ivan,

I used tools>developers tool kit to find 'stylesheet_tm.css' - not found. I looked in other '.css' files for '.bot-banners' ref. - none found. However, I did find a '.bot-banners' ref. in 'html_header.php' under '<style type="text/css">'.

Any ideas?

Thanks,
Mike

26 Jul 2012, 3:32 PM
#4
mlapage avatar

mlapage

New Zenner

Join Date:
Jun 2012
Posts:
21
Plugin Contributions:
0

Re: center Header Title

Ivan,

Never mind, I manually found 'stylesheet_tm.css' and added the code indicated above - no change.

This is the code found for '.bot-banners':

.bot-banners{
width:525px;
background:url(../images/title1-bg.png) repeat-x left top #3c4046;
border-radius:4px;
-moz-border-radius:4px;
-webkit-border-radius:4px;
position:relative;
overflow:hidden;
margin-left:1px;
}
.bot-banners div{
float:left;
text-align: center;
width: 100%;
}
.bot-banners h3.title{
color:#f4f8fe;
font-size:13px;
line-height:16px;
padding-left:172px;
}

Any ideas?

Mike

26 Jul 2012, 3:42 PM
#5
mlapage avatar

mlapage

New Zenner

Join Date:
Jun 2012
Posts:
21
Plugin Contributions:
0

Re: center Header Title

Ivan,

I noticed when I 'ftp'd' '.css' file from my computer (14,825) to host, the file size did not change in host dir. (14,182) and permission is '0644'. could this be a factor?

28 Jul 2012, 4:02 PM
#6
mlapage avatar

mlapage

New Zenner

Join Date:
Jun 2012
Posts:
21
Plugin Contributions:
0

Re: center Header Title

I am looking for an 'easy' way to center the title on a header bar. If you look at the home page http://www.mimirbooks.com/ bottom of center section, you will see the header bar "Mimir Books Online - ...". I have done the steps ivan999 suggested with some success, but as you can see on the home page I'm not quite there.

Here is the up-to-date code for the .bot-banners:

.bot-banners{
width:525px;
background:url(../images/title1-bg.png) repeat-x left top #3c4046;
border-radius:4px;
-moz-border-radius:4px;
-webkit-border-radius:4px;
position:relative;
overflow:hidden;
margin-left:1px;
}
.bot-banners div{
float:left;
text-align:center;
width: 100%;
}
.bot-banners h3.title{
color:#f4f8fe;
font-size:13px;
line-height:16px;
padding-left:172px;
text-align:center;
}

Does the 'padding-left' somehow control the alignment? I would greatly appreciate any help to center the text.

Mike

28 Jul 2012, 4:22 PM
#7
stevesh avatar

stevesh

Black Belt

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

Re: center Header Title

Remove the red part:

.bot-banners h3.title{
color:#f4f8fe;
font-size:13px;
line-height:16px;
padding-left:172px;
text-align:center;
}

Change the red part to 250px, or to taste:

ul.tabs2 li.last{
padding-right:142px;
border-bottom:1px solid #fff;
border-right:none;
width: 100px;
text-align: center;
}

28 Jul 2012, 4:34 PM
#8
mlapage avatar

mlapage

New Zenner

Join Date:
Jun 2012
Posts:
21
Plugin Contributions:
0

Re: center Header Title

Just worked it out, deleted the 'padding-left:172px;. Thanks stevesh and I will look at the other.

Thanks for all the help!

Mike