Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted January 15, 20196 yr Can anyone here please help me get rid of two unwanted horizontal space below and above the sidebar advert? https://carnity.com/
January 16, 20196 yr 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.
January 16, 20196 yr Author Thanks @jpointer2_merged any clue which file has that <br> to omit? I couldn't find any <br> in custom.css nor in advertisements
January 16, 20196 yr 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.
January 16, 20196 yr Author Thanks a lot, it's removed with a big relief. Now let's see if someone can help in leveling the top as well?
January 16, 20196 yr 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?
January 16, 20196 yr Author 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.
January 16, 20196 yr 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; }
January 16, 20196 yr Author 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?
January 16, 20196 yr 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.