Trying to align banner on the sidebar

Posted in: Newspaper
Post count: 9

Hi there,

i’m trying to align the 300×300 banner on the sidebar, so it’s in the middle. But somehow i tried a view CSS while in inspect element, but when the CSS is added the banner floats still on the left.

You can view the 300×300 ad via visiting: http://test.skien.nl/

Post count: 285

Hi @rovara,
<code><img src="http://static.tradetracker.net/nl/material_image/73/07faee365397225f98fde0ba10e99ce9d99eb8.jpg" rel="nofollow" class="aligncenter" target="_blank" alt="here some words" width="300" height="250" /></code>

  • This reply was modified 9 years by nairolf.
  • This reply was modified 9 years by nairolf.
  • This reply was modified 9 years by nairolf.
Post count: 7909

Hi,

Please use the specific div container recommended for non-adsense code – https://forum.tagdiv.com/using-other-ads-non-adsense-ads/ There is a specific css for this and the image will be centered – http://screencast.com/t/hpRz4Xay5ppZ
If you want to use the code like it is, you will need to create a custom css. Try this one – http://screencast.com/t/onzuoutGpE

.td-a-rec-id-sidebar div{
display: table;
margin-left: auto;
margin-right: auto;
}

Thanks!

Post count: 9

Hi Alin,

Thanks for your reply!

I added the code as you suggested to the Custom CSS part in the Admin area, but the banners in the sidebar are still nog aligned in center.

Do you have any idea why?

Post count: 23312

Hello Rovara,

I have tested the code provided by my colleague Alin and it seems to work as properly. Please try to add the !important tag to give a high priority of the code.

.td-a-rec-id-sidebar div{
display: table;
margin-left: auto!important;
margin-right: auto!important;
}

The result you should see here -> http://screencast.com/t/KzRhXBfxa8KC

Thanks for the message!

Post count: 9

Hi Catalin,

Tried the exact same code in our custom CSS field, but without result, also after clearing cache.

I would like to give you access to check why this is still occurring.

Could you please help?

Post count: 23312

Hello Rovara,

Please check your Custom Box Area and also, please ensure that you have no syntax error. This could be one reason
why is not it working. Also, you can provide here a screen to your custom CSS box.

Thanks.

Post count: 9

Where can i check if i have a Syntax error?

This is our CSS code:


.sf-menu > li > a {
padding: 0 30px 0 22px;
}

.sf-menu > .current-menu-item > a:after, .sf-menu > .current-menu-ancestor > a:after, .sf-menu > .current-category-ancestor > a:after, .sf-menu > li:hover > a:after, .sf-menu > .sfHover > a:after {
background-color: #4d4d4d;
}
.woocommerce .product .onsale {
background: #ff5555;
border-radius: 4px;
/* box-shadow: none; */
/* text-shadow: none; */
margin: 4px;
padding: 2px 7px 2px 7px;
line-height: 32px;
font-size: 12px;
}
.single-product .product .summary .cart .button {
border: 1px solid #008c00;
box-shadow: inset 0 -2px 0 0 #090;
color: #fff;
background: #00b900;
font-size: 15px;
padding: 15px 140px 15px 140px;
text-shadow: none;
border-radius: 2.5px;
}
.heading-section {
display: block;
text-align: center;
position: relative;
margin-bottom: 20px;
margin-top: 15px;
}

.heading-section {
position: relative;
background: #25366d;
z-index: 2;
color: white;
text-transform: uppercase;
border-style: solid;
border-left-width: 25px;
border-right-width: 25px;
border-color: white;
font-size: 24px;
padding: 10px 30px;
}

.woocommerce .product a.button, .woocommerce .product #respond input#submit, .woocommerce .checkout input#place_order, .woocommerce .woocommerce.widget .button {
border: 1px solid #008c00;
box-shadow: inset 0 -2px 0 0 #090;
color: #fff;
background: #00b900;
font-size: 14px;
padding: 13px 29px 13px 29px;
text-shadow: none;
border-radius: 2px;
}

.td_mega_menu_sub_cats .cur-sub-cat {
color: #25366d;
}

.sf-menu ul .td-menu-item > a:hover, .sf-menu ul .sfHover > a, .sf-menu ul .current-menu-ancestor > a, .sf-menu ul .current-category-ancestor > a, .sf-menu ul .current-menu-item > a {
background-color: #25366d;.td-pb-row [class*="td-pb-span"] {
display: block;
min-height: 1px;
float: left;
padding-right: 24px;
padding-left: 48px;
position: relative;

}.td-pb-row {
padding-left: 48px;
}
.heading-section {
background: #25366d;
z-index: 2;
color: white;
text-transform: uppercase;
border-style: solid;
border-left-width: 385px;
border-right-width: 385px;
border-color: #fff;
font-size: 24px;
padding: 15px 87px;
align-content: center;
}

.td-related-title .td-cur-simple-item {
background-color: #25366d;
}
.woocommerce .product .woocommerce-tabs .tabs .active {
background-color: #25366d
}
.woocommerce .product .button:hover {
background-color: #06ad06;
}

.single-product .product .summary .cart .button:hover {
background-color: #06ad06;
}

.td-a-rec-id-sidebar div{
display: table;
margin-left: auto!important;
margin-right: auto!important;
}

Post count: 23312

Hello Rovara,

Please send us an email at contact@tagdiv.com with your log-in information (wp-admin) so we can further inspect it closer your setup page. Also, provide there the link to this topic so we can easily identify you.

Thanks for the message!

Viewing 9 posts - 1 through 9 (of 9 total)
The forum ‘Newspaper’ is closed to new topics and replies.