Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Problems with align or float in wordpress theme

  • This topic is empty.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #180380
    konkursi.info
    Participant

    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,
    Eric

    #180382
    Paulie_D
    Member

    Wanna show us a link?

    Can’t do much with a vague description.

    #180384
    konkursi.info
    Participant
    #180436
    wahhabb
    Participant

    Hi! 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)?

    #180445
    konkursi.info
    Participant

    Yes, 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:

    http://s11.postimg.org/zdzy40rjn/css_net.png

    #180453
    wahhabb
    Participant

    If 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;
    }
    #180468
    konkursi.info
    Participant

    i already tried, but it stands like on picture like it doesn’t read div class…

    #180472
    Paulie_D
    Member

    i 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.

    #180534
    konkursi.info
    Participant

    I’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.

    #180537
    Paulie_D
    Member

    Perhaps you could make a reduced case example in Codepen?

    #180593
    konkursi.info
    Participant

    It 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

    http://codepen.io/anon/pen/aolKd

Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘CSS’ is closed to new topics and replies.