Forum Moderators: martinibuster

Message Too Old, No Replies

Fixed Adsense blocks

         

fi5hbone

1:35 am on Apr 19, 2006 (gmt 0)

10+ Year Member



Hi there,
Is there any way to make fixed Adsense blocks? Not like those floating div's and such. But more like a code which i can put in my css file that makes the adsense block appear at say, left:45px and top:450px. so even when the user scrolls it's kept there and does not follow the user.

Now the trick is that this position will be in the middle of my text so i would like my text to automatically wrap around this block. Is it possible?

fi5hbone

2:16 am on Apr 19, 2006 (gmt 0)

10+ Year Member



oh i forgot to mention, that my text layer overlaps with the one which i want to wrap around. here is an example of my css code.

#block {
position: absolute;
clear: right;
top: 100px;
left: 430px;
width: 100px;
height: 100px;
}

#content {
position: absolute;
top: 100px;
left: 30px;
width: 500px;
height: 800px;
}

so since #block is within #content, basically i want the text in #content to wrap around #block. is this possible? by the way, this would be a template so i would not like to manually add in the block where i want to.

Rodney

2:36 am on Apr 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you assigned a float: right or float: left to the div where you show adsense, I think your text would wrap around the div.

fi5hbone

2:42 am on Apr 19, 2006 (gmt 0)

10+ Year Member



thanks for the reply! however i tried it and it did not work at all!

Rodney

2:45 am on Apr 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



did you assign a separate div for the adsense block?

fi5hbone

2:50 am on Apr 19, 2006 (gmt 0)

10+ Year Member



yes i did! i used the css code above and just did the following too the html file

<div id=content></div>
<div id=block></div>

Rodney

2:55 am on Apr 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't know about the CSS you posted above, but if you have a plain block of text:

text text text text
text text text text
text text AD AD ADA
text text AD AD ADA
text text AD AD ADA
text text text text

This can be acheived by a simple <div style="float:right">Adsense code here</div> type setup.

fi5hbone

2:57 am on Apr 19, 2006 (gmt 0)

10+ Year Member



ahhh yeah i understand. but this time around, i want it to be part of a template. so i don't want to manually put in the code each time you see. i want the block to be there when i paste my content in already and then it automatically wraps around the block.

so basically you got part of it right. i want to achieve this.

text text text text
text text text text
text text AD AD ADA
text text AD AD ADA
text text AD AD ADA
text text text text

but i want the text to be editable but not the ad region. so this whole thing forms a template. umm it's confusing i know but did you get what im trying to say?

Rodney

3:23 am on Apr 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Could you just make a class called "righty" or whatever and assign that class one element "float:right" and then instead of <div style="float:right"> it would be <div class="float:right">

I'm far from a CSS expert, so I can guarantee the results, but I've used something like that before.

As far as your "template", I have no idea how your template is setup, so I couldn't advise you there.

fi5hbone

3:34 am on Apr 19, 2006 (gmt 0)

10+ Year Member



hmm, okay to simplify it:

this is my proposed template


___________________
AD AD ADA¦
AD AD ADA¦
AD AD ADA¦
AD AD ADA¦
¦
¦
¦
¦
¦
___________________¦

so the white space are editable regions but the ad space if fixed. so how do i do the above so all i have to do is to paste my content in the above template the the text wraps around the ad?

fi5hbone

4:59 am on Apr 19, 2006 (gmt 0)

10+ Year Member



to make it clearer ive included an image. this is my proposed layout for my TEMPLATE.

grey: editable region
pink: ad regions which i want fixed

so when i paste my content in, it will go in the grey area and naturally wrap around the pink regions.

anyone knows how to do this?

[edited by: Woz at 5:25 am (utc) on April 19, 2006]
[edit reason] No reviews or URLs please, see TOS. [/edit]

fi5hbone

6:47 am on Apr 19, 2006 (gmt 0)

10+ Year Member



hahaha. okay looks like i can't post pictures. so i'll try me best to describe it here then.
____________________________
AD AD AD¦TEXT TEXT TEXT TEXT¦
AD AD AD¦TEXT TEXT TEXT TEXT¦
AD AD AD¦TEXT TEXT TEXT TEXT¦
TEXT TEXT TEXT TEXT TEXTTEXT¦
TEXT TEXT TEXT TEXT TEXTTEXT¦
TEXT TEXT TEXT TEXT TEXTTEXT¦
AD AD AD¦TEXT TEXT TEXT TEXT¦
AD AD AD¦TEXT TEXT TEXT TEXT¦
AD AD AD¦TEXT TEXT TEXT TEXT¦
TEXT TEXT TEXT TEXT TEXTTEXT¦
TEXT TEXT TEXT TEXT TEXTTEXT¦
____________________________¦

the "text" bit if my editable region (a.k.a where the text goes in) and the "ad" bit is where the ad goes in. this is for a template so the ad bits have to be fixed in that position. when i wanna input content, all i have to do is to copy and paste my content into the white space and it automatically wraps around the fixed ad bits and voila. i save and am good to go.

is this clearer?