WordPress.org

Forums

Format padding in Header (3 posts)

  1. heliosphan1
    Member
    Posted 7 years ago #

    Hello,

    I am trying to format the header trying to add some padding to the left side of the image in the header.

    The code is as follows.

    index page:
    <div id="header"></div>

    css:
    #header {
    background:#5308A8;
    border-bottom-color:#000;
    color:#222;
    height:125px;
    background-image: url('images/tencar-logo.gif');
    background-repeat: no-repeat;
    }

    I've tried padding-left, margin-left, and other varitions but nothing seems to work.

    Thanks!

  2. Jeremy Clark
    Moderator
    Posted 7 years ago #

    Padding only applies to elements inside the div. The image is set as the background of the div. Use this to center your image.

    #header{
    background-position: center;
    }
  3. heliosphan1
    Member
    Posted 7 years ago #

    thanks!!

Topic Closed

This topic has been closed to new replies.

About this Topic