Hey, I want my ads to float in the right sidebar as "Daniweb." On Daniweb the social sharing buttons and related posts are sticky, I want the same configuration for my website.

Member Avatar for diafol

If you're using Chrome, you can use right click > inspect and have a look at the CSS applied to each element on the page.

Hey that not works I tried.

Member Avatar for diafol

So did I - and it did..


When you right click and inspect the element, take a look at the line that diafol highlighted for you. Then, scroll the page up and down and you will see that the position changes from absolute to fixed. To do this, you'll need some additional javascript/jQuery to change the position style depending on where you are on the page/scrolling.

about floating ads on right sidebar maybe on css you need ad Float: right; but also you need to testing your website page to put it.

Be a part of the DaniWeb community

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