Jump to content

Spacing issue on sidebar


Gauravk

Recommended Posts

Posted

Hi @Gauravk,

The space below the ad is quite straight forward, you have 2x line breaks on your code. Remove one, or both of them.

<br>
<br>

The space above, is a little more difficult, you are best setting a negative top margin on the <div> around the advert.

Posted
27 minutes ago, Gauravk said:

Thanks @jpointer2_merged any clue which file has that <br> to omit?

I couldn't find any <br> in custom.css nor in advertisements

It won't be in your CSS file, as this is HTML.

Go to your theme editor and try looking in your core > global > sidebar template file. You can also search <br><br> when in the theme editor, above the list of files. I found similar on mine but this might not mean it's the same on yours.

brbr.JPG

Posted
7 minutes ago, Gauravk said:

Thanks a lot, it's removed with a big relief.

Now let's see if someone can help in leveling the top as well?

No problem. 🙂 Is your advert in the advertisement settings? What's the code you have for it?

Posted
2 minutes ago, jpointer2_merged said:

No problem. 🙂 Is your advert in the advertisement settings? What's the code you have for it?

There is no code in sidebar advert setting, as it's an image upload and nothing else.

Posted
6 minutes ago, Gauravk said:

There is no code in sidebar advert setting, as it's an image upload and nothing else.

Okay, not the cleanest of ways but try adding the following to the bottom of your style .css:

[data-role="sidebarAd"] {
    margin-top:-8px;
}

 

Posted
9 minutes ago, jpointer2_merged said:

Okay, not the cleanest of ways but try adding the following to the bottom of your style .css:

 

It worked fine with -10.

May I know why you said it's not the cleanest way....? Is it going to cause any harm in future while updating?

Posted
2 minutes ago, Gauravk said:

It worked fine with -10.

May I know why you said it's not the cleanest way....? Is it going to cause any harm in future while updating?

It will work fine and shouldn't cause any issues, the cleanest way would be to wrap the advert in a <div> and style a class. It's just better practice but no more effective than what you've just done. 🙂

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...