Announcement

#16 2013-03-15 03:43:55

pewe
Member
2012-03-16
439

Re: Google adsense on left and right side

As I am not a coder, please forgive my observation if it is not relevant.

I am not sure what you expect as a change when you reduce screen size as you have set your position of the block at a fixed value in the css.
For example for your left block you have fixed the position from the left at 92px, and for the right block at 1488px from the left.

When I view it full res (1920x1080) the left block outline is 147px from the left and the right block is 1543px from the left (I guess the 55px difference is the hidden block background - as seen by the overlap of your centre panel by the right hand block).

As I reduce the screen size the two blocks stay in the same place relative to the left (which is as it should be - you fixed their position) with the right block eventually disappearing off the screen and the centre panel moving behind the left block as the centre panel balances on the smaller screen and the left block staying in its fixed position.

I cannot see how you can have the blocks change their size or position if you have fixed them in the css, and I do not know what you need in the css to make them variable to balance for different screen sizes (if that is even possible).

Although does not offer a solution - I hope it makes sense ;).

Offline

 

#17 2013-03-15 12:15:40

obucek
Member
2013-03-10
13

Re: Google adsense on left and right side

Thx for answer.

I try also relative position and i cant move adds outside main container.

How can I Build a 3-Column Layout in CSS for stripped theme?

Then I can put left adds into 1th column, gallery and photos into 2nd column and right adds into 3 column!

How to do that?

Thx for answer

Offline

 

#18 2013-03-15 12:44:53

Ralf
Member
Dorsten-Lembeck
2012-05-08
230

Re: Google adsense on left and right side

Hi,

my guess:
the template you are using has a fixed width or if the template uses percentual values the summary is greater than 100%.

Say your template uses a width of 200px for the menu and 600px for the content you have a total width of 800 px.
Now you have added your sidebar with a width of 8%.
When you visit  your site with a resolution set to 800px width the gallery itself matches to this resolution.
But where to put the ad-sidebar ?
8% from 800px = 64px - in my example you have a total width of 864px.
Either you now have horizontal scrollbars or an overlapping of the sidebar.

You can try to align your block to the right with 'float:right' :
http://www.w3schools.com/css/css_float.asp

If this does not work - i think you need to modify the css file(s) of the template you use.

Hope that helps

Cheers
Ralf


There are only two kinds of music:
Rock and Roll

https://www.ralf-kerkhoff.de

Offline

 

#19 2013-03-15 15:18:25

obucek
Member
2013-03-10
13

Re: Google adsense on left and right side

OK

I hope that I solve my problem. Thx to all!

In local css I add

body {
background-color: rgb(122, 122, 122);
margin-top: 0;
margin-left: 0;
margin-right: 0;
}

#wrapper
{
width: 950px;
margin: 0px auto;
position: relative;
background-color: rgb(122, 122, 122);
}


#leftcolumn
{
position: absolute;
top: 100px;
left: -160px;
width: 160px;
padding: 0 0 0 0;
background-color: transparent;
}

#rightcolumn {
position: absolute;
top: 100px;
right: -200px;
width: 200px;
float: right;
padding: 0 0 0 0;
background-color: transparent;
}

#centercolumn
{
top: 0px;
margin-left: 200px;
margin-right: 200px;
padding: 0 0 0 0;
position: static;
background-color: transparent;
}


then in header.tpl after </head> i add

<div id="wrapper">
<div id="container">
<div id="leftcolumn">
<p>SCRIPT</p>
</div>
<div id="rightcolumn">
<p>SCRIPT</p>
</div>
</div>


I hope that I solve my problem. Must check on different resolution.

Thx to all and all the best

Offline

 

#20 2013-03-15 15:33:42

pewe
Member
2012-03-16
439

Re: Google adsense on left and right side

This seems to work down to a screen width of 1275px - any smaller and your left hand panel starts to disappear off the screen to the left.

Other than that it does look a lot better ;)

Offline

 

#21 2013-03-15 16:48:42

EdwinKort
Translation Team
Rhoon, the Netherlands
1970-01-01
95

Re: Google adsense on left and right side

ddtddt wrote:

@EdwinKort

no in your css local file

Yeah, that is what I mean :) But, since I'm not smart enough I will not continue with this. There is enough other stuff to concentrate on this moment.

Last edited by EdwinKort (2013-03-15 17:35:39)


My Gallery
Hosted with: Surpass Hosting since 2004

Offline

 

#22 2013-03-15 17:40:19

obucek
Member
2013-03-10
13

Re: Google adsense on left and right side

I saw @pewe, but dont know how to solve this problem!

Any idea?

Offline

 

#23 2013-03-15 18:20:05

pewe
Member
2012-03-16
439

Re: Google adsense on left and right side

I am sorry - but I have no idea how to change the behaviour.
I wish I could offer some suggestions ;(

Offline

 

#24 2013-03-15 18:30:09

obucek
Member
2013-03-10
13

Re: Google adsense on left and right side

Ok thx ;)

Offline

 

#25 2016-12-18 18:01:17

Dejansoftware
Guest

Re: Google adsense on left and right side

Google adsense on "View in: Mobile" do now shows Adsense ads but in Desktop View it is ok.

What I have to do to fix this in mobile?

thanks

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact