PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, October 24, 2022

[FIXED] How do I add a margin to the left of the logo in a WP header

 October 24, 2022     css, header, wordpress     No comments   

Issue

I am using the Ashe theme on Wordpress, which places the logo on the header image of the site in the middle. I managed to move the logo to the left of the header, but it has no margin, so the edge of the logo is right on the edge of the site. I want to add a 15px margin to the left of the logo, but nothing seems to work.

I have the following additional css added:

$custom_logo_defaults img{float:left;margin-top:20%;margin-left:15px}

$custom_logo_defaults .site-title{margin-top:2%;margin-left:15px}

I have also tried changing the php code in the style sheets, but that also doesn’t seem to have any effect.


Solution

The code you have provided will not work as is. You need to add the correct CSS selectors.

The correct CSS would be:

.custom-logo-defaults img {
    float: left;
    margin-top: 20%;
    margin-left: 15px;
}

__

.custom-logo-defaults .site-title {
    margin-top: 2%;
    margin-left: 15px;
}


Answered By - Mohamed Elgazar
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing