WordPress.org

Ready to get started?Download WordPress

Forums

Centering an image / Float (5 posts)

  1. alessandro.scoccia.pappagallo
    Member
    Posted 1 year ago #

    Hello, sorry to bother you with a silly question. I've starting working with programming and WordPress from just a couple of weeks.

    My problem today is that I have a log shifted to the left and I would like to have it centered. Unfortunately float doesn't have this option.

    The code is;

    /* 2.3 Header */
    #header{padding:30px 0 30px;clear:both;position:relative;}
    
    #logo  { float: left; }
    #logo img  { }
    #logo .site-title, #logo .site-description  { color: #000; display:none;  }
    #logo .site-title a { color:#222; font-size:40px; line-height:40px; text-transform:none; font-weight:bold; text-decoration:none; }
    #logo .site-title a:hover { text-decoration:underline; }
    #logo .site-description { color:#999; }

    Any idea what could I use for centering the logo (without giving the size of the logo itself?). I already tried with "margin-left: auto; margin-right: auto;" but unfortunately it doesn't work. :)

  2. jnhghy
    Member
    Posted 1 year ago #

    Hi,
    you need to have an upper level <div> set to have text-align: center; to have it's content centered... if you can share you site address it will help us give you more specific guidance.
    Regards

  3. alessandro.scoccia.pappagallo
    Member
    Posted 1 year ago #

    I have no idea how to do that. :D By the way this is the website: http://www.youthunitedpress.com (I didn't post it before because I didn't want to do spam!). Thank you in advance jnhghy! :)

  4. jnhghy
    Member
    Posted 1 year ago #

    ok, where can I see your logo?

  5. SNSD Photo
    Member
    Posted 1 year ago #

    your site is under maintenance mode.

    note: if it's about design problems, you better share the site link and it will not marked as spam (usually, most of them).

Topic Closed

This topic has been closed to new replies.

About this Topic