• I am new to CSS and I am simply trying to float my header ad “right” so that it’s not in the center of the screen, pushing the title down.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Try some CSS-specific forums like http://CSSCreator.com/forum

    Phil

    (@owendevelopment)

    Have you tried adding:

    .advertclass {
    float: right;
    }

    It’s difficult for people to help you without posting a URL of your site.

    To clarify what Phil means. This would be the header HTML:

    <header>
      <h1>Your title</h1>
      <div class="advertclass"><!-- // Ad content --></div>
    </header>

    Then use a modification of Phil’s CSS example:

    h1 {
      display: inline;
      float: left;
    }
    .advertclass {
     float: right;
    }
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Float Ad right in header using CSS’ is closed to new replies.