Forums

[resolved] Use inline styles to position adsense leaderboard? (4 posts)

  1. futureproof
    Member
    Posted 5 years ago #

    Hi all

    Im a bit confused about how to position my adsense leaderboard. Its currently at the top of my main content but its positioned to the left. I'd like it to be centered. How can I center it?

    http://supertv.jp/

  2. BPartch
    Member
    Posted 5 years ago #

    Hello

    Place the ad code within a division:
    <div class="leaderboard">code goes here</div>

    Then in the .css file add:
    .leaderboard {
    width: 728px;
    height: 90px;
    margin: 0 auto;
    }

    Hope it helps. :)`

  3. BPartch
    Member
    Posted 5 years ago #

    Hello

    Or if you want to use an inline style, just add it to the div as follows:

    <div style="width: 728px; height: 90px; margin: 0 auto;">code goes here</div>

  4. futureproof
    Member
    Posted 5 years ago #

    Thanks all :) Just went out and picked up a book on CSS. Its surprisingly simple once you understand the basics of the syntax. Hopefully my threads on here will be less "noobish" from now on.

Topic Closed

This topic has been closed to new replies.

About this Topic