Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    New Coder crank01's Avatar
    Join Date
    Jan 2011
    Posts
    96
    Thanks
    10
    Thanked 2 Times in 2 Posts

    Unhappy How do I make CSS appear behind adsense?

    I recently made a black css table and I would like it to appear behind my google adsense but so far it is only appearing infront. I'll paste the code I have so far of my table...I want it to appear behind the adsense and not infront. PLEASEEEEEE help me
    <style type="text/css">
    table,th,td
    {

    position:absolute;
    left:322px;
    top:250px;
    height:30px;
    width:938px;
    border:1px solid black;
    background-color:#000000;
    background-position:left top;font-family:Verdana,Geneva,sans-serif;font-size:12px}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,th,td{text-align:left;
    font-weight:normal}blockquote:before,blockquote:after,q:before,q:after{content:""}blockquote,q{quotes:""" "}div.clear,span.clear{clear:both;display:block}em{font-style:italic}a{text-decoration:none}.container{width:972px;padding-bottom:30px;margin:0 auto}.main{width:972px;text-align:left;
    Last edited by crank01; 04-30-2011 at 06:31 PM.

  • #2
    New Coder crank01's Avatar
    Join Date
    Jan 2011
    Posts
    96
    Thanks
    10
    Thanked 2 Times in 2 Posts
    heres an image i just uploaded to how my page looks, its a niche so i had to erase some stuff out like the name

    http://img638.imageshack.us/i/wordpressv.jpg/

  • #3
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,182
    Thanks
    23
    Thanked 603 Times in 602 Posts
    Have you tried using the z-index?

  • #4
    New Coder crank01's Avatar
    Join Date
    Jan 2011
    Posts
    96
    Thanks
    10
    Thanked 2 Times in 2 Posts
    yes but z-index would make the table appear infront of the adsense code, right?

  • #5
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,182
    Thanks
    23
    Thanked 603 Times in 602 Posts
    Quote Originally Posted by crank01 View Post
    yes but z-index would make the table appear infront of the adsense code, right?
    You can also set to appear behind.

  • #6
    New Coder
    Join Date
    Apr 2011
    Location
    New Delhi, India
    Posts
    27
    Thanks
    0
    Thanked 2 Times in 2 Posts
    r u using table or div in ur layout...

    or possible paste both HTML & CSS code

  • #7
    New Coder
    Join Date
    May 2008
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just as z-index can be used to position something 'on top' of something else, it can also be used for the opposite - the trick would be to make the z-index of the table lower than that of the adsense.

  • #8
    New Coder crank01's Avatar
    Join Date
    Jan 2011
    Posts
    96
    Thanks
    10
    Thanked 2 Times in 2 Posts

    Arrow

    omg thank you so much for replying ppl, ive been asking sooo many ppl about this question ok but when I look at the adsense code it doesnt have a z-index, am i right? and apparently u cant edit the code since its against there TOS, so how would I make the table appear infront with a z-index? I'll paste there code below, plz help everyone, I'll be so thankful ..
    <style type="text/css">
    table,th,td
    {

    position:absolute;
    left:322px;
    top:250px;
    height:30px;
    width:938px;
    border:1px solid black;
    background-color:#000000;
    background-position:left top;font-family:Verdana,Geneva,sans-serif;font-size:12px}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,th,td{text-align:left;
    font-weight:normal}blockquote:before,blockquote:after,q:before,q:after{content:""}blockquote,q{quotes:""" "}div.clear,span.clear{clear:both;display:block}em{font-style:italic}a{text-decoration:none}.container{width:972px;padding-bottom:30px;margin:0 auto}.main{width:972px;text-align:left;

  • #9
    New Coder
    Join Date
    Apr 2011
    Location
    New Delhi, India
    Posts
    27
    Thanks
    0
    Thanked 2 Times in 2 Posts
    y don't u use det image as background image which u want to appear behind ad n use padding or margin to get space in all four corners...

  • #10
    New Coder crank01's Avatar
    Join Date
    Jan 2011
    Posts
    96
    Thanks
    10
    Thanked 2 Times in 2 Posts
    well I already have a background image for my wordpress theme, but do u mean like use a background header background, for header.php? Im not great at coding so I dont really fully understand what u mean.

  • #11
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,182
    Thanks
    23
    Thanked 603 Times in 602 Posts
    crank01 I wonder why you just didn't try to add the z-index and play with it. It would have saved you a lot of time.

    I think objects inherent the index of their parent. Anyway chances are the ad has a z-index of 1 and that's what i surmise to start things off.

    Give your table an ID=joker.

    Add this to the css just under what you published above.
    #joker{
    z-index: -1;
    }

    If that don't do it Make the index more negative -2, then -3 until it's behind the ad.

  • Users who have thanked sunfighter for this post:

    crank01 (05-06-2011)

  • #12
    New Coder
    Join Date
    Apr 2011
    Posts
    46
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Crank01, I agreed with sunfighter, why not just try using z-index with negative values?

  • Users who have thanked Dr3am3rz for this post:

    crank01 (05-06-2011)

  • #13
    New Coder
    Join Date
    Apr 2011
    Location
    New Delhi, India
    Posts
    27
    Thanks
    0
    Thanked 2 Times in 2 Posts
    show us ur both code HTML & also CSS that way u can be helped so easily...

    and what i was saying in my last message was U can use background image in ur ad container... whether is TABLE CELL or DIV

    and z-index is another way out for example

    z-index: 100;

    will always behind

    z-index: 200;

    so in short higher number is always in front

    But make sure u r using postion where ever u use z-index as it won't work if position is not declared to that element where u r gonna use it...
    Last edited by amitsh; 05-05-2011 at 08:44 PM.

  • Users who have thanked amitsh for this post:

    crank01 (05-06-2011)

  • #14
    New Coder crank01's Avatar
    Join Date
    Jan 2011
    Posts
    96
    Thanks
    10
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by sunfighter View Post
    crank01 I wonder why you just didn't try to add the z-index and play with it. It would have saved you a lot of time.

    I think objects inherent the index of their parent. Anyway chances are the ad has a z-index of 1 and that's what i surmise to start things off.

    Give your table an ID=joker.

    Add this to the css just under what you published above.
    #joker{
    z-index: -1;
    }

    If that don't do it Make the index more negative -2, then -3 until it's behind the ad.
    k thanks I'll try this first, then I'll let you know if this worked or not thx

  • #15
    New Coder crank01's Avatar
    Join Date
    Jan 2011
    Posts
    96
    Thanks
    10
    Thanked 2 Times in 2 Posts
    The: #joker{z-index: -1;} WORKED, and so MUCH THANKS to everyone in this thread haha, im so excited now that I'm thanking all u guys for helping me in this tough problem


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •