- This topic is empty.
-
AuthorPosts
-
August 23, 2014 at 10:41 am #180380konkursi.infoParticipant
I’ve trying for few hours to insert adsense code 160×600 in my wordpress theme, to the left and to the right of the container but unsuccesfull. I’ve installed it in header.php and it loads properly but can’t manage to align it to the left, container in middle and other code to align to the right.
Is there someone who wanna help?
Regards,
EricAugust 23, 2014 at 10:46 am #180382Paulie_DMemberWanna show us a link?
Can’t do much with a vague description.
August 23, 2014 at 10:54 am #180384konkursi.infoParticipantAugust 24, 2014 at 11:37 am #180436wahhabbParticipantHi! I looked at your site but didn’t see the adsense code you were referring to. There were some google ads on the page, but a different size. What is the div name?
When you say you want to align the ad to the left, you mean have it touch left margin of browser window (i.e. be outside of .sitecontainer)?
August 24, 2014 at 2:07 pm #180445konkursi.infoParticipantYes, i want it on the left and the right side of the container to touch left and right margin of browser windows. I’ve removed that code because i didn’t managed to get it working… Here is the result:
here is the picture:
August 24, 2014 at 6:05 pm #180453wahhabbParticipantIf I understand it correctly, perhaps what you want to do is this:
#leftad { position:absolute; top:0; left:0; } #rightad { position:absolute; top:0; right:0; }
August 24, 2014 at 10:27 pm #180468konkursi.infoParticipanti already tried, but it stands like on picture like it doesn’t read div class…
August 25, 2014 at 12:06 am #180472Paulie_DMemberi already tried, but it stands like on picture like it doesn’t read div class…
It’s a little unclear what that means but the use of position absolute should work.
Have you given the new divs a width/height or any content?
Perhaps you could make a reduced case example in Codepen?
It doesn’t need to have any content, just rough colored divs we can use to see the respective sizes and positions.
August 25, 2014 at 9:30 am #180534konkursi.infoParticipantI’ve tried relative, absolute, align, float… Everything, but it seems like it doesn’t work… I’ve created new divs (added them to style.css) and then in header.php added content and before and after i’ve called div class… I’ve added it before this part of code:
<div class="sitecontainer container">
<div class="container clearfix navcontainer">
<div class="logo">
<code></code>
I’ve tried to use<
div> and
<
div> for that adsense code (160×600) but every time I got
1 (LEFT)
2 (RIGHT)
Container
Cant even manage to get 1 2. Final goal is 1 container 2.August 25, 2014 at 9:34 am #180537Paulie_DMemberPerhaps you could make a reduced case example in Codepen?
August 25, 2014 at 3:05 pm #180593konkursi.infoParticipantIt works great when i use code pen, but i need to implement this in header.php file, and that is so complicated, can’t get it done. What should i do? It looks so easy, but there is something wrong… P.S. I’ve copied full header.php (HTML). Any suggestion what should i do?
I’ve already tried to put the div class leftad or right to almost all places but still can’t get it properly working
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.