Gauravk Posted January 15, 2019 Share 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/ Link to comment Share on other sites More sharing options...
Gauravk Posted January 16, 2019 Author Share Posted January 16, 2019 Anyone can please help with this? Link to comment Share on other sites More sharing options...
MSUKForum Posted January 16, 2019 Share 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. Link to comment Share on other sites More sharing options...
Gauravk Posted January 16, 2019 Author Share 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 Link to comment Share on other sites More sharing options...
MSUKForum Posted January 16, 2019 Share 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. Link to comment Share on other sites More sharing options...
Gauravk Posted January 16, 2019 Author Share 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? Link to comment Share on other sites More sharing options...
MSUKForum Posted January 16, 2019 Share 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? Link to comment Share on other sites More sharing options...
Gauravk Posted January 16, 2019 Author Share 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. Link to comment Share on other sites More sharing options...
MSUKForum Posted January 16, 2019 Share 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; } Link to comment Share on other sites More sharing options...
Gauravk Posted January 16, 2019 Author Share 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? Link to comment Share on other sites More sharing options...
MSUKForum Posted January 16, 2019 Share 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. 🙂 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.