Hello,

I would like to change only the content top to content botton from colors to image background - exacly same one (really good looking - George you are God!) from BlueMasters (image bg.png).

Anyone could tell me if its possible and what to change in style.css and/or page.tpl.php?

Thank you!

CommentFileSizeAuthor
#11 corporateclean-content-bg.jpg653.24 KBgtsopour
#8 myconf.png116.76 KBludzik
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gtsopour’s picture

Assigned: Unassigned » gtsopour
Issue tags: +corporate, +Corporate Theme, +Corporate Clean Theme, +CorporateClean
gtsopour’s picture

Hello ludzik,

This brief guide will demonstrate how to setup Corporate Clean theme to support a local.css file where custom CSS rules and modifications could be placed. Following this practise, there is no worry if the next theme update will override all your custom changes and you should follow this practise in any theme if you use.
This can be done in 3 simple steps:

  1. Create an empty .css file under the /sites/all/themes/corporateclean path and name it as you wish. local.css is always a good choice.
  2. Edit the corporateclean.info file and add a line like stylesheets[all][] = local.css after stylesheets[all][] = color/colors.css
  3. Clear all cached data.
    This step is important in order to force your template to be informed for the changes you have made in the template files. To do this go to Administer » Site configuration » Performance » Clear cached data

Finally, your corporateclean.info file will contain the following code

name = CorporateClean
description = CorporateClean: A flexible, recolorable theme with many regions.
version = VERSION
core = 7.x

stylesheets[all][] = style.css
stylesheets[all][] = color/colors.css
stylesheets[all][] = local.css

regions[search_area] = Search area
regions[highlighted] = Highlighted
regions[content] = Content
regions[sidebar_first] = First sidebar
regions[banner] = Banner
regions[footer_first] = Footer first
regions[footer_second] = Footer second
regions[footer_third] = Footer third
regions[footer] = Footer
regions[footer_bottom_right] = Footer bottom right
regions[help] = Help
regions[page_top] = Page top
regions[page_bottom] = Page bottom

settings[breadcrumb_display]= 1
settings[slideshow_display]= 1
settings[slideshow_effect]='scrollHorz'
settings[slideshow_effect_time]='10'

project = "corporateclean"

Now, you can edit the local.css file and add your style rules which will override the CSS3 gradient behind the content div. In order to accomplish this, you should add the following code inside local.css and of course add the bg.png from Bluemasters theme in your images folder.

#content { background: transparent url(images/bg.png) repeat-x; }

Thanks
/George

ludzik’s picture

Hello George,

I'm not sure if I'm right :

1 - I create file under the /sites/all/themes/corporateclean/local.css file

2 - my corporateclean.info looks now like that

name = CorporateClean
description = CorporateClean: A flexible, recolorable theme with many regions.
version = VERSION
core = 7.x

stylesheets[all][] = style.css
stylesheets[all][] = color/colors.css
stylesheets[all][] = local.css


regions[search_area] = Search area
regions[highlighted] = Highlighted
regions[content] = Content
regions[sidebar_first] = First sidebar
regions[banner] = Banner
regions[footer_first] = Footer first
regions[footer_second] = Footer second
regions[footer_third] = Footer third
regions[footer] = Footer
regions[footer_bottom_right] = Footer bottom right
regions[help] = Help
regions[page_top] = Page top
regions[page_bottom] = Page bottom

settings[breadcrumb_display]= 1
settings[slideshow_display]= 1
settings[slideshow_effect]='scrollHorz'
settings[slideshow_effect_time]='10'

project = "corporateclean"
; Information added by drupal.org packaging script on 2012-02-29
version = "7.x-1.4"
core = "7.x"
project = "corporateclean"
datestamp = "1330527642"

3 - my local.css looks like that

#content { background: transparent url(images/bg.png) repeat-x; }

is that all ? or do i need to put something more in to that file local.css? when you said "add your style rules " you means re-write local.css to looks as style.css looks like? If yes, I'm not so good to write that whole code :/ and would be nice to just get original code of that file with corect replacement if possible

4 - after clear the cache no background change :( of course I put that file to image folder, but I asume I've done it something wrong

Thank you very much George!

gtsopour’s picture

Hello ludzik

You have done the right implementation. The local.css file should contains only the following code
#content { background: transparent url(images/bg.png) repeat-x; }

Are you sure that you have placed the right image with .png format in your sites/all/themes/corporateclean/images folder? Is your Drupal installation online in order to examine your final style through my web tools?

Thanks
/George

kaushashah’s picture

Hi ludzik,

If you have put the image into your images folder then the path for the image should be:

#content { background: transparent url(../images/bg.png) repeat-x; }

gtsopour’s picture

Hello kaushashah
thank you for your email.

The local.css file is on the same level with images folder. There is no need to declare this
#content { background: transparent url(../images/bg.png) repeat-x; }

Please , check out all background image declarations inside style.css for example. style.css and local.css are on the same level.

Thanks
/George

kaushashah’s picture

Hi George,

Yup sorry!! I didn't noticed that.

ludzik’s picture

FileSize
116.76 KB

Hello,

Checked couple times now, even downloaded once again fresh version of theme and replace the old one, and no change to background at all :( I'm 100% sure that png file is in right place :(

screen of that config in file

any ides ? I assume if that should work something stupid is set it up on my page if I know my luck ;)

anyway thank you all for help!

otherwise solution for my problem would be possibility to be able to turn on region highlighted, content and right sidebar on bluemasters theme and transfer "menu" (that black one) from corporate clean there as well - that would give me same result even bluemasters looks little bit better ;)

kaushashah’s picture

Hi ludzik,

From the screenshot attached, you have put your image inside the "images" folder so the css file should contain:

#content { background: transparent url(../images/bg.png) repeat-x; }

as the images and the css file are not residing at the same level.

ludzik’s picture

Hello kaushashah,

Try it that, doesn't work ever.

Got now that file everywhere to by sure, and test it all directories with no results :( Of course cleared cash all the time.

Maybe I could change colors.css to support image background somehow?

Thank you for answers.

gtsopour’s picture

FileSize
653.24 KB

Hello ludzik,

I just repeated my above instructions and managed to change the #content div background image. Please checkout the attachment corporateclean-content-bg.jpg

Did you clear Drupal's cached data? This step is important in order to force your template to be informed for the changes you have made in the template files and corporateclean.info. To do this go to Administer » Site configuration » Performance » Clear cached data

Finally, could you create a screenshot as the one i sent you, through Chrome browser » Tools » Developer tools and selecting the #content div from left sidebar?

Thanks
/George

Collins405’s picture

This works great in every browser except IE 9
Does anyone know of a fix?

ITMonkey’s picture

Try setting the image to an absolute path rather than a relative one and try again in IE9.

Collins405’s picture

nah doesnt make a difference.
this is my code as it is now...

#banner { background: transparent url("images/bgMainEdit.png"); repeat-x; }
#content { background: transparent url("http://www.skirmishdevon.co.uk/sites/all/themes/corporateclean/images/tower_bg2.jpg"); background-repeat: repeat-x; }

i have tried...

#banner { background: transparent url("images/bgMainEdit.png"); repeat-x; }
<!--
body
#content {
	
	background-image:url("images/tower_bg2.jpg");
	background-repeat:repeat-x;

}

-->

which loads the gradient behind the content first, then the image loads over the top, which actually looks a lot nicer than the first way, which loads the image over a plain black background.

I have an image behind my scrolling banner, and an image behind the main content. They both show fine in every browser except ie9

I read on another forum somewhere that a guy was struggling with a smiliar issue, and by changing "html" to "body" he got it to work in every browser. but that doesnt seem to be the case.

Collins405’s picture

I DID IT! this has been killing me all week!

all i did was add a filter for ie9, and the background images finally showed up!!

my original code in the local.css file.

#banner { background: transparent url("images/bgMainEdit.png"); repeat-x; }

and now:....

#banner { 
	background: transparent url("images/bgMainEdit.png"); repeat-x; 
		/* IE6-9 */ 
filter:  progid:DXImageTransform.Microsoft.AlphaImageLoader(src="images/bgMainEdit.png",sizingMethod='scale');
 
 }

sorted!

messer.mw’s picture

Issue summary: View changes

Thank you guys,

This was much help, really appreciate all the efforts made
100% Working from 1st time trying to apply it.

Many Thanks Drupal Community