Forum Moderators: open

Message Too Old, No Replies

Preventing Scrolling

         

andmunn

4:43 pm on Nov 2, 2004 (gmt 0)

10+ Year Member



Quick Question:

I have setup my site to include an "advertisement" (placed on the right side of a centered table using CSS).

It looks great on higher resolutions. MY goal though , is to make it seem like it's "not there" on lower resolutions. However, on lower resolution, the horizontal scroll bar is active.

Is there any way to disable this horizontal scroll bar, or alternatively, program it so the ad isn't displayed in lower resolutions?

Let me know,
Andrew.

whoisgregg

5:40 pm on Nov 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try putting
overflow:hidden;
CSS style on the element and see if that has the intended effect. (It may be better to put it on the parent element, not really sure)

You may also want to post this in the CSS forum [webmasterworld.com] as the answer surely lies in CSS styling.

MatthewHSE

6:45 pm on Nov 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Note that this will skew your statistics, as it will be downloaded and "displayed" even if the visitor can't see it. How small of resolution are you talking about?

andmunn

7:56 pm on Nov 2, 2004 (gmt 0)

10+ Year Member



The site is customized for a 800*600 resolution - the "main table" being approx 750 pixels.

Now, for anyone whose using "better than" 800*600 resolution, i want it to display the add on the right of this table.

I didn't even think of the problem of "actually counting impresions" even though the add isn't displayable... Hm..i'm using goole adwords and wonder if this would have an adverse effect?

Is there any simple javascript that could perhaps be incorporateD? Perhasp soemthing like :

if resolution = 800*600
then display ad.
if resolution > 800* 600
don't display ad?

Maybe i'm getting to complciated...maybe i should rethink this? Any suggestions appreciated.

Andrew.

tedster

9:19 pm on Nov 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you go ahead with this, I'd suggest you not base the code on resolution, but rather on available width (window.availWidth) - resolution does not tell you if the window is full screen, has sidebars open, etc.

But mostly, I'd say your suspicion is on the money - this is a bit too complicated an approach altogether. You certainly don't want to generate issues with Google.

I have seen sites that simply allow the horizontal scrollbar for ads on the right. If you ensure that the immediately readable content does not require scrolling, that can be workable.

MatthewHSE

10:05 pm on Nov 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I thought you were talking about a graphical ad that you were charging someone to place on your site. It should make less difference since you're using AdSense. However, you might think about trying a separate stylesheet for those with smaller resolutions, assigned using JavaScript, which would use absolute positioning to place the ads in a different location - say just below your header. Of course, the feasibility of this depends on what type of AdSense "shape" you're using.