I have wordpress problem with banner going under content as you can see here: http://www.djeli.me/di/ZEJ9/slika1.png

Code in header:

            <script type="text/javascript">
            var clientWidth =   window.screen.width;
            if(clientWidth >= 800){
                document.write('<div id="divAdRight" style="position: absolute; top: 0px; width:100px; height:500px; overflow:hidden;"> <a href="http://yourwebsite.com" target="_blank"><img src="http://www./wp-content/plugins/float-left-right-advertising/rightbanner.jpg"  width ="100" alt="" /></a></div><div id="divAdLeft" style="position: absolute; top: 0px; width:100px; height:500px; overflow:hidden;"><a href="http://yourwebsite.com" target="_blank"><img src="http://www.st.tk/.eu/wp-content/plugins/float-left-right-advertising/leftbanner.jpg" width ="100" alt="" /></a></div>');    

                var MainContentW = 1150;
                var LeftBannerW = 100;
                var RightBannerW = 100;
                var LeftAdjust = 10;
                var RightAdjust = 10;
                var TopAdjust = 80;

There is no new plugin or support on https://wordpress.org/plugins/float-left-right-advertising/
So If you can help me because I think this is css problem but cannot fix it?

Recommended Answers

All 4 Replies

I think this is css problem but cannot fix it?

You cannot fix it because you are not familiar with CSS/styling or because you have some other reason preventing you from using a CSS solution?

I looked at the picture, but im not sure what im looking at where you circled. Are these images? if so, should they be somewhere else on the screen?

Your site doesnt come up for me.

But seeing the comparison between the two pictures, its my guess that the content you are describing that seems to be over the banners has a higher z-index value. Keep in mind that as you add elements to your page, if they are not in their normal flow, they will overlap each other.

You can try to have the banners "overlap" all other content by applying a higher "z-index" value. So say the banners have a class assigned called "banner", you can style it this way...just an example. this doesnt have to be the actual value. i just picked a high random value assuming that your other elements have a z-index lower than this value.

 .banner { z-index: 9999 }

I have added z-index: 9999; to javascript code and now it works :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.