ElkArte Community

Project Support => Support => Topic started by: omBre on January 19, 2018, 01:03:29 am

Title: background images with CSS
Post by: omBre on January 19, 2018, 01:03:29 am
Jorin nice job, please can You tell me with what code and where in the css should I put lines for header image?
 
Title: Re: background images with CSS
Post by: Jorin on January 19, 2018, 01:10:11 am
The background image can be set in the CSS file of your theme. Please create a file named "custom_light.css" (if you are using the light variant of the theme) and copy it to /themes/yourtheme/css/_light (or the folder of your variant). Try this code inside this file:

Code: [Select]
#top_section {
background-image: url(../../images/yourbackgroundimage.png);
background-position: center;
}
Title: Re: background images with CSS
Post by: omBre on January 19, 2018, 01:35:55 am
no I am using the social, but probably if I put this code in the light theme, the header image would be also lined up in the social or I need to do two files for each one?

Title: Re: background images with CSS
Post by: Jorin on January 19, 2018, 01:38:38 am
If you use another variant of the template, the file must be named after the variant and in the CSS folder of the variant, correct.
Title: Re: background images with CSS
Post by: omBre on January 19, 2018, 01:43:54 am
Thanks for the help!

Is it possible in such way to be added background image for the middle section behind the board?
Title: Re: background images with CSS
Post by: Jorin on January 19, 2018, 01:52:50 am
Yep, on my board it's this code:

Code: [Select]
body {
background: #f0f0f0;
background-image: linear-gradient(to right, #f0f0f0 0%, #e6e6e6 50%, #f0f0f0 100%);
color: #464646;
}

I will split the topic.