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