Organized Themes

  • Support Forum
    • My Profile
    • Forum
    • Documentation
    • Knowledge Base
    • How-To Videos
    • Reset Password
  • Themes
  • Pricing
  • Blog
  • Contact

Change Logo on Smaller Screens

Support Area › Forums › United › Change Logo on Smaller Screens

Tagged: logo, media query, responsive

  • This topic has 6 replies, 2 voices, and was last updated 13 years, 2 months ago by Bill Robbins.
Viewing 7 posts - 1 through 7 (of 7 total)
URL to the page in question:
  • Author
    Posts
  • August 28, 2013 at 17:16 #13506
    Zane Winberg
    Participant

    Hello Bill,

    I have a regular logo that I use till the screen size gets to the ‘@media only screen and (max-width: 767px)’

    Then I want to swap the logo out using this code from the style.css:

    #logo,
    #text-logo {
    padding-right: 3%;
    padding-left: 3%;
    src:url(‘http://www.example.com/my_better_logo.png’);
    }

    The padding right and left work, but it doesn’t load my_better_logo.png, instead it just keeps shrinking my full logo.

    Any idea what I’m doing wrong?

    Thanks much and I love the United theme!

    Zane

    August 28, 2013 at 20:41 #13509
    Bill Robbins
    Participant

    Zane,

    Good question there. The logo is loaded via an img tag so you can’t actually swap it out via the CSS directly.

    What you could do though is use the text-indent property to cause the logo image to be moved off screen. You could then set a background image via CSS that will actually be your logo. It would look something like this:

    
    @media only screen and (max-width: 767px) {
    
    	#logo h1,
    	#logo p {
    		text-indent: -9999px;
    		background-image: url(https://yoursite.com/image.png);
    	}
    
    }
    

    Give that a shot and see if that won’t work for you. If you have any trouble, let me know,
    Bill

    August 29, 2013 at 09:39 #13515
    Zane Winberg
    Participant

    Good morning Bill,

    Thank you so much for your super fast response! I tried this method and it looks to me like the another div is covering my image… especially as the page scrolls. Can you take a look here and see if I’m missing something?

    Thanks again for the awesome support!

    Zane

    August 29, 2013 at 09:41 #13516
    Zane Winberg
    Participant

    Bill,

    I forgot to mention that you need to shrink the page down to see the logo swap and what is happening.

    Thanks!

    Zane

    August 29, 2013 at 12:41 #13520
    Bill Robbins
    Participant

    Zane,

    Great looking site! I did forget that since we’re using a background image now, we’ll need to set a height to keep the image from being cut off. Try using something like this:

    
    @media only screen and (max-width: 767px) {
    
    	#logo h1,
    	#logo p {
    		text-indent: -9999px;
    		height: 130px;
    		background-image: url(https://yoursite.com/image.png);
    	}
    
    }
    

    and see if that won’t work out better for you. You may need to play around with the height to get just the right fit.

    If you have any trouble, let me know,
    Bill

    August 29, 2013 at 12:58 #13526
    Zane Winberg
    Participant

    Thank you!
    Got it! Thanks again for your help! Have a great day Bill.

    Zane

    August 29, 2013 at 13:00 #13527
    Bill Robbins
    Participant

    Fantastic!

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Change Logo on Smaller Screens’ is closed to new replies.

Log in

Log In

Lost Your Password?

Support Hours

Monday to Friday
8 AM to 6 PM, EST

Allow us to build your website for you

Website customization service

Website development service

Theme Documentation

  • Agency
  • Authentic
  • Bottega
  • Church Builder
  • Curator
  • Elite
  • Epic
  • Finesse
  • Forward
  • Foundation
  • Foxy
  • Grassroots
  • Kerygma
  • Live
  • Meza
  • Mise En Place
  • Moonrise
  • Photobug
  • Pneuma
  • Progress
  • Responsive Visual
  • Selfie
  • Umami
  • United

Demo Content

To set up your site using the content from the demo, please visit the Sample Content Page.

Keep In Touch

Sign up for our newsletter to always know what's happening at Organized Themes.

Facebook X/Twitter Contact Us

Company

  • Affiliates
  • Blog
  • About
  • Terms & Conditions

Themes

  • Nonprofit Themes
  • Business Themes
  • Restaurant Themes
  • Church Themes
  • Older Themes

Recommendations

  • Hosting

© 2008 – 2026 Organized Themes. All Rights Reserved

css.php
The forum is read-only. Theme docs are still here. Please visit our main website for support or to buy new WordPress Themes.Visit
+