WordPress.org

Ready to get started?Download WordPress

Forums

Catch Box
[resolved] CSS page template no sidebar (3 questions) (23 posts)

  1. strasse
    Member
    Posted 1 year ago #

    Having some troubles with the CSS of this theme... Can someone help me , i have 3 questions

    1.I was wondering how to edit the width of the menu items on a no sidebar template page.

    On a page with sidebar i can put "how do we work" on one line but if i choose a page with template "no sidebar" this menu items is on two lines (not nice)

    2. also, how to edit the position of the title and text on page template no sidebar because by default it is very low and in the middle , i want it higher and on the left

    3. How to change the backgroundcolor of the content pages? I want a background behind my page content

    http://wordpress.org/extend/themes/catch-box/

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Could you post a link to your website, please?

  3. strasse
    Member
    Posted 1 year ago #

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    1) Your width of each menu item is defined by padding.
    On style.css line 519, you have,

    #branding .default-menu a, #branding ul.menu a, #colophon #access-footer ul.menu a {
    color: #EEE;
    line-height: 3em;
    padding: 0 1.2125em;
    text-decoration: none;
    }

    padding: 0 1.2125em Applies 1.2125em to the left and right of each element.

    If you want to start changing styles, I would recommend creating a child theme for the CSS
    http://codex.wordpress.org/Child_Themes
    Once you have, let us know so we can help you further.

    To apply your style to pages without sidebars, you'll need to use CSS selectors with this at the beginning:
    .page-template-page-disable-sidebar-php

  5. strasse
    Member
    Posted 1 year ago #

    Hi,

    I have made a child theme now and adapted the value to 1.8 and it works
    so problem 1 solved :)

    any suggestions for the other probs?

    thanks!

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

    2) Do you want to remove the gap between the title and text?

  7. strasse
    Member
    Posted 1 year ago #

    the gap between the top of the content area and the title and the left content area and the title

    if you look at "home", the title position is more to the left and closer to the nav bar than it is on a page with template no sidebar

  8. Andrew
    Forum Moderator
    Posted 1 year ago #

    2) Try this

    #content{
     padding: 0 5% 2em 2%;
    }
  9. strasse
    Member
    Posted 1 year ago #

    stays the same

  10. Andrew
    Forum Moderator
    Posted 1 year ago #

    Oops I meant this

    .hentry{
     padding: 0 5% 2em 2%;
    }
  11. strasse
    Member
    Posted 1 year ago #

    still nothing

    I just found out that problem 1 is still on (i watched it on firefox and thought it was fixed but on chrome i still have two lines for my menu item :( )

  12. Andrew
    Forum Moderator
    Posted 1 year ago #

    Sorry I was looking at the home page (wrong page),

    Use this CSS

    .page-template-page-disable-sidebar-php .singular.page .hentry{
     padding: 0.5em 5% 2em;
    }
    .page-template-page-disable-sidebar-php .singular .entry-header{
     margin: 0;
    }
  13. strasse
    Member
    Posted 1 year ago #


  14. strasse
    Member
    Posted 1 year ago #

    looks like nothing is happening, maybe i made a mistake to my childtheme? (never worked with it before)

    I have:

    /*
    Theme Name:     catch-box
    Theme URI:      http://example.com/
    Description:    Child theme for the Twenty Eleven theme
    Author:         Your name here
    Author URI:     http://example.com/about/
    Template:       catch-box
    Version:        0.1.0
    */
    
    .singular.page .hentry{
    padding: 0.5em 5% 2em;
    }
    .singular .entry-header, .singular .entry-content{
    margin: 0;
    }

    I've put it in style.css in a subdirectory(with name childtheme) of catch-box (my theme folder)

    is this the right way? cause i have a feeling it's not working correct

  15. Andrew
    Forum Moderator
    Posted 1 year ago #

    Try

    .page-template-page-disable-sidebar-php .entry-header {
     margin: 0;
    }

    Does this work?

  16. Andrew
    Forum Moderator
    Posted 1 year ago #

    And
    wait 1 sec

  17. strasse
    Member
    Posted 1 year ago #

    nope and nope. :(

    are you sure my childtheme is correct?

  18. Andrew
    Forum Moderator
    Posted 1 year ago #

    I really can't tell sorry.

  19. strasse
    Member
    Posted 1 year ago #

    it's my child theme that was wrong, i ve put the above css (all :) ) in "custom css" space on the theme options and problem 1 and 2 are fixed

  20. Andrew
    Forum Moderator
    Posted 1 year ago #

    3) You want a background colour different than the white, shown behind the article text on all pages?

  21. strasse
    Member
    Posted 1 year ago #

    yeah i want to know where to edit the color of the two fields :

    one is at the moment the gray big content field

    and in that one there is another field, the white rectangle where the page title and content are shown in

  22. Andrew
    Forum Moderator
    Posted 1 year ago #

    To change the "grey big content field" colour, you should use a hexadecimal value (#ff0000 etc.).

    body, #page{
     background-color: #yourColour;
    }

    To change the "white rectangle where the page title and content are shown in", add to the same .singular.page .hentry styles

    .singular.page .hentry{
     padding: 0.5em 5% 2em 2%;
     background-color: #yourColour;
    }
  23. strasse
    Member
    Posted 1 year ago #

    ok thanks a lot for all your time!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags