Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #344837

    Hi, I’d like to know how to change the background color for one element (e.g. text box) but full width and height. Currently I know it can be adjusted through the settings on VC>design options but it turns out as a colored block with uncolored margins, not full width/height. (see linked image: http://www.easierprint.com.sg/wp-content/uploads/2014/11/Screenshot.png)

    Also, is there any way to change page background color for only certain pages on the site? I tried the CSS on enfold styling but it changes the bg color for all pages. Unfortunately I am not very familiar with CSS :(

    Appreciate any help given! Thanks!

    #344955

    Hi Aefiel!

    You can do that with the color section element. I went ahead and added it in with the advanced layout editor so you can see how it’s done. To do it on other pages just drag the color section over and select which color you want to use.

    Best regards,
    Elliott

    #445329

    Hi Elliott,

    This is useful; however, advanced layer sliders can’t be contained in color sections. Can you suggest another fix, please..?

    • This reply was modified 9 years, 6 months ago by friendlier.
    #445918

    Hey!

    Go ahead and send us a link to your page and take a screenshot highlighting what your trying to do so we can get a better idea.

    Best regards,
    Elliott

    #445931

    Hi Elliott,

    I used:-

    #top.page-id-34 .main_color, .main_color .site-background {
    background-color: white! important;
    }

    the first part of the CSS #top.page-id-34 restricts it to the landing page

    I’ve sent you a link to the site so you can check it out for yourself ;-)

    best

    Simon

    #446409

    Hi!

    However, I’m going seriously wrong when I try to apply to ore than one page

    #top.page-id-2 , .page-id-34 .main_color, .main_color .site-background {
    background-color: white! important;
    }
    http://www.calmyoga.fr/ (id 34)
    http://www.calmyoga.fr/en (id 2)

    and it’s driving me nuts. Please help!

    #446977

    Hey!

    Please try the following:

    .page-id-2 .main_color {
    background-color:#ddd !important;
    }

    You might have to remove your other CSS for it to work.

    Best regards,
    Rikard

    #447264

    Hi – I need both pages; ID-34 and ID-32 to have that css. So what I’m confused about is how to list them with commas.

    Thanks

    best

    Simon

    #447269

    Hey!

    Please use the code as following

    .page-id-32 .main_color,.page-id-34 .main_color {
    background-color:#ddd !important;
    }

    Best regards,
    Yigit

    #447291

    Perfect – thanks for the quick reply!!!

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Change background color per element – full width’ is closed to new replies.