WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] CSS (13 posts)

  1. Mamphey
    Member
    Posted 1 year ago #

    Hi Guys,

    I am using the code below in style.css for
    http://www.ghanalandlords.com/
    to try and move the image above the site title to the right like it is on this site - http://www.qstalk.com/

    it is the same code i used in http://www.qstalk.com/ but it is not working for http://www.ghanalandlords.com/. theme and everything is the same tho. Would be grateful if someone could see what i maybe doing wrong.

    thanks in advance

    .site-header { position: relative; padding-top: 100px; }
    .header-ads { position: absolute; left: auto; top: 30px; width: 100%; text-align: center; }
    @media screen and (min-width: 600px) {
    .site-header { position: relative; padding-top: 1.71429rem; }
    .header-ads { position: absolute; left: auto; right: 0; top: 30px; text-align: right; max-width: 70%; }
    }

  2. jholder83864
    Member
    Posted 1 year ago #

    Is it possible you have those mixed up in your post?

    The image doesn't appear on the first site, but works on the second.

  3. jholder83864
    Member
    Posted 1 year ago #

    I'm unsure which image you're referring to on the ghanalandords site.

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    You absolutely should NOT be modifying the default theme files - you will lose all your changes when the theme is updated AND it's crucial to have a clean copy of the default theme for troubleshooting. You need to go back and make a child theme and make any modifications there - see: http://codex.wordpress.org/Child_Themes

  5. Mamphey
    Member
    Posted 1 year ago #

    @jholder83864 - it is a different image on the first site but of a similar size.

    @WPyogi - just having problems with setting up the child theme which is why i edited the default. I take your point tho and will try again. Do you see any problems with my code above at all.

    cheers

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Yes, it is a serious problem to modify the default theme - sorry to persist but we get too many people here who have created a big mess for themselves by doing just that. You need to go back and make a child theme - if you need help with it, people here are happy to help you with it.

  7. Mamphey
    Member
    Posted 1 year ago #

    @ WPyogi

    ok i did follow the instruction of the link you provided but it changes the site layout. I am not sure what i did wrong but when i try to create a child theme this is always the result i get.

    http://www.ghanalandlords.com/

  8. Mamphey
    Member
    Posted 1 year ago #

    this is the information in my child theme.

    /*
    Theme Name: Twenty Twelve Child
    Theme URI: http://www.ghanalandlords.com/
    Description: Child theme for the Twenty Twelve theme
    Author: Your name here
    Author URI: http://www.ghanalandlords.com/
    Template: twentytwelve
    Version: 0.1.0
    */
    @import url("../twentytwelve/style.css");

    .site-header { position: relative; padding-top: 100px; }
    .header-ads { position: absolute; left: auto; top: 30px; width: 100%; text-align: center; }
    @media screen and (min-width: 600px) {
    .site-header { position: relative; padding-top: 1.71429rem; }
    .header-ads { position: absolute; left: auto; right: 0; top: 30px; text-align: right; max-width: 70%; }
    }

  9. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    It's not set up properly - start again and follow the instructions in the linked page above. Do not use all caps for the chile theme folder, do not use spaces in the same. Make sure the files structure is correct - the child theme goes on the same level as all other themes, make sure you have ONLY the style.css file in the child theme and ONLY the required top section to start with:

    /*
    Theme Name: Twentytwelve Child
    Description: Child theme for the twentytwelve theme
    Author: Your name here
    Template: twentytwelve
    */
    
    @import url("../twentytwelve/style.css");
  10. Mamphey
    Member
    Posted 1 year ago #

    there you go. i knew i could do it. THANK YOU VERY VERY VERY MUCH.

    Now is there any chance you could help me with the code pls?

    Ta

    Sam

  11. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    YAY! Excellent - now just move the CSS code you added to the parent into the child theme so that it's safely there and won't get overwritten.

  12. Mamphey
    Member
    Posted 1 year ago #

    @ WPyogi - Just wanted to say thank you. I would like to buy you a beer but don't know how.

    THANK YOU.

  13. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Virtual beer is fine :) Thanks! I'd recommend that you make the other site into a valid child themes as well. You also need to move any modified .php files into the child theme too. Now you're safe to change files and keep WP updated - which is really important since it can involve security and compatibility issues.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags