Jump to content

Need help centering a picture seal in a content box on my homepage


brave200

Recommended Posts

Hello:

 

On my test website I have a seal with some java script. I installed the module "content box" and pasted the javascript code in as html. I then hooked the module to my left column of my homepage. Everything works great!

 

My only issue is I want to center the seal with in the content box. Right now it's aligned to the left etc. I tried using some inline CSS tags with a div style in the actual context box editor but Prestashop removes them. Could someone give me some pointers on the right way to get this Seal centered in the box? Should I be looking at making adjustments in the global.css or a TPL file?

 

Thanks a lot! and the address to view the seal is http://www.coffeemingle.com/presta/index.php

Link to comment
Share on other sites

Just add align="center" to the <div tag as I show below, then add padding-bottom:10px; to star_grey at line 20 as I show below.

 

(code you pasted into content box)

<div align="center" id="auction-nudge-profile" class="auction-nudge">

 

/profile_build/css/star_grey

a#badge{padding-bottom:10px;display:block;padding-top:68px;...........................

 

 

Should look like this when done.

post-310220-0-17823800-1395269820_thumb.jpg

Link to comment
Share on other sites

#auction-nudge-profile a#badge {
display: block;
padding-top: 68px;
width: 150px;
height: 82px;
color: #000;
font-size: 10px;
line-height: 15px;
background-position: top left;
background-repeat: no-repeat;
background-image: url('http://assets-auctionnudge.s3.amazonaws.com/images/theme/profile-star-grey-bg.png');
} 

or just simple margin:auto to

Link to comment
Share on other sites

Hi Everyone! Thanks for the great suggestions. I have one issue in which I should of closely paid more attention too. (I'm new to this web design stuff but I feel like I'm picking it up very quickly!)

 

It seems like to me the CSS file is being pulled remotely and I am not able to change that. I might have to make my own CSS file or do some inline CSS with some HTML. Does any method work better? I'm really stomped here and any help is appreciated! Thanks so much!

 

Here is a copy of the exact code I am given from the website http://www.auctionnudge.com - I simply just pasted this in the body of the content box module as HTML. The JavaScript works which was my goal, just the formatting is a bit off.

 

+++++++++++++++++++++++++++++

<script type="text/javascript" src="//www.auctionnudge.com/profile_build/js/UserID/brave200/siteid/0/theme/star_grey"></script>
<div id="auction-nudge-profile" class="auction-nudge"><a href="http://www.auctionnudge.com/your-ebay-profile">Embedded eBay Profile By Auction Nudge</a></div>

+++++++++++++++++++++++++++++

Link to comment
Share on other sites

 

In your global.css in theme folder add this:

#auction-nudge-profile a#badge{
   margin:0 auto !important;
}

This works and does center the image however for me I would also need to add padding-bottom:10px as shown below otherwise the badge is still sitting on top of the Tags border.

 

#auction-nudge-profile a#badge{
   margin:0 auto !important;
   padding-bottom:10px
}
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...