• I want to add advertising in my site.
    I want the advertising chase the surfer when he rolled down and up.
    I want that when the surfer goes rolling down the Advertising will go down with him.
    How can this be done?
    Hope I’m explaining well

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter maordany

    (@maordany)

    HELP ??

    Moderator cubecolour

    (@numeeja)

    Bumping threads is not allowed on this forum. People often to look for threads with no replies to help with.

    At first I couldn’t make much sense of what you were asking for. I had visions of a character on a surfboard moving up & down the page. I don’t think I’ve heard of site visitors being referred to as surfers for a while ??

    However after rereading a few times, I hope that you are actually asking for an element which stays in the same place onscreen when the site visitor scrolls up & down, so that the ad is always visible. This element would be a div containing a graphic, text or both.

    Mark up a div on your page with the id “fixed” containing your text or image and can position it by including something like this in your stylesheet (editing the values as appropriate):

    #fixed {
    	position: fixed;
    	top: 20px;
    	right: 0;
    	width: 200px;
    	border: #000;
    	background: #FFF;
    }

    If you have a centered design and want the static element to be positioned relative to the main content rather than the edge of the browser, you can enclose the fixed element within a container div and use something like this in your stylesheet:

    #fixed-container {
    	top: 0;
    	position: fixed;
    	margin: 0 auto;
    	width: 940px;
    }
    
    #fixed {
    	position: relative;
    	top: 20px;
    	left: 730px;
    	width: 200px;
    	border: #000;
    	background: #FFF;
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Scrolling advertising’ is closed to new replies.