• Resolved rturnup

    (@rturnup)


    Hello all,
    I am very new to this and have been learning as I go. I have searched and can not find a answer to my problem I and trying to get just the middle of my site to be while and wrap my background image around the white. Similar to
    https://www.bridezilladesign.co.uk

    The only thing I can find that is close to what I want is to add this to my custom.css

    .wrap {
    background-color: white;
    margin: 0 auto;
    max-width: 940px;
    padding: 0 30px;
    position: relative;
    }

    but when that is done it stretches to high and blocks or covers my header and footer and covers my menus also my sidebar from being displayed
    Any help would be greatly appreciated.
    I have removed the custom css code for now because the site is live and cannot be navigated with those setting in place. If any can help and needs for me to put it back for a moment just let me know and I will add the code back and link my site.

    thank you in advance

Viewing 15 replies - 1 through 15 (of 15 total)
  • Arteyin

    (@arteyin)

    link would be helpful

    Thread Starter rturnup

    (@rturnup)

    Thank you for your response
    the link to the site is
    https://rturnup.com/

    with the above code this is how it looks. my side bar is gone and it overtakes my header and footer

    Arteyin

    (@arteyin)

    you are using .wrap{} which targets everything with the class name containing .wrap. Your header, navigation, whatever else that has the white background contains this class name which should either be removed, or the block that you want the white background should be called something else.

    Thread Starter rturnup

    (@rturnup)

    Thank again for your response.
    I am very new to this and am learning as I do so have any suggestions as to how to make the block for the background be called something else.
    I really do not know where to start, the wrap{} code that I tried I got from reading post on this site and I really don’t know how to edit it other than playing around with the margin and padding

    Arteyin

    (@arteyin)

    in your code, it would look something like this

    <div class="wrap" ....

    what that is saying is the DIV tag has a class name called wrap.
    Your css is telling all classes named wrap to accept the background colour, etc that you told it to. so what you would do is

    <div class="new_wrapper_name_of_choice"...

    use the wrapper name of choice (you can keep the old one if you want/has other styles) and now you would call

    .new_wrapper_name_of_choice{}

    (or use # instead of . for IDs)

    Thread Starter rturnup

    (@rturnup)

    would this be in the header and or footer.php or functions.php

    Arteyin

    (@arteyin)

    the css styling can be added in the header, footer, page, or a .css file

    changing the class name would be wherever you declared the tag

    Thread Starter rturnup

    (@rturnup)

    is there a way of accomplishing what I an trying to do using only the custom.css or if I am understanding correctly I need to look through every file and locate <div class=”wrap” …. and change it to <div class=”new_wrapper_name_of_choice”…

    I am sorry if I am asking to much of you or if you feel as thought you have explained it enough but it is kind of going over my head and the thought of digging through theme files and changing them frightens me as I might totally screw some thing up

    Arteyin

    (@arteyin)

    then try #main .wrap{/*your css here*/} because it seems like thats the only wrap class in your #main ID

    lisa

    (@contentiskey)

    changing them frightens me as I might totally screw some thing up

    please be sure you have a backup before making any changes in case you need to revert back to original.
    are you using a child theme for all changes to theme template files?
    are you using a child theme or css editor for any changes to style.css?

    Thread Starter rturnup

    (@rturnup)

    @arteyin thank you so much it is almost perfect. One this is is there a way to get my side bar to display again. without the code my sidebar displays showing most viewed, newest, etc…. but with the code in the custom.css it is gone

    Thread Starter rturnup

    (@rturnup)

    @contentiskey I am using custom.css wich does not overwrite theme files.

    Thread Starter rturnup

    (@rturnup)

    @arteyin everything from sidebar seems to be displayed at the bottom under load more button. will changing the padding or margin fix this

    Arteyin

    (@arteyin)

    it probably will fix it. you have it encased in the same div as your content, so there is probably no room for it to fit.

    Thread Starter rturnup

    (@rturnup)

    hello just wanted to give a update
    thanks to Arteyin I have resolved my issue.

    This is what was done just in case someone needs it in the future.
    custom.css

    #main .wrap {
    background-color: white;
    margin: 30px;
    max-width: 1170px;
    padding: 0 10px 0;
    position: relative;
    }

    Thank you so much Arteyin you are awesome!!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘How do I add a white background to the middle section leaving header footer …’ is closed to new replies.