How to change article background?

Everything to do with Joomla! 2.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
emstanev
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Mon May 21, 2012 7:00 pm

How to change article background?

Post by emstanev » Fri Jun 01, 2012 7:45 pm

Here: http://em-stanev.org/index.php/lessonalink - I change calmly with Joomla editor the settings of the background article (very light blue) and here: http://em-stanev.org/index.php/filesdownlod - in no way will. White - no changes…

This is from Copy/Paste text procedure, isn’t it? I revolved many ways - will not. NONE. What is missing? Standard <BODY background=…> - TinyMCE editor rejected this.
I am with JCE editor - in no way will. JCE editor had no direct access to HTML.

Any idea ???

Markstein
Joomla! Hero
Joomla! Hero
Posts: 2268
Joined: Sat Feb 09, 2008 8:27 am
Location: California, USA

Re: How to change article background?

Post by Markstein » Fri Jun 01, 2012 8:27 pm

You can just alter the CSS so that your background color is set on each page instead of using the editor to put a background color behind your text. Open this file:

http://em-stanev.org/templates/beez_20/css/personal.css

Find this code:

Code: Select all

#main
{

}
Change it to:

Code: Select all

#main
{
background: #EEFFFF;
}
Remember to always make a backup of your code before editing it.

Mark

emstanev
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Mon May 21, 2012 7:00 pm

Re: How to change article background?

Post by emstanev » Sat Jun 02, 2012 6:49 am

Hello Sir,

Thank you very much.
I want every article to have different background color. Personal.css is for all of them, isn't it?
In the past, I try to find where Joomla keeps article files, but whitout success.

How to change background color in every article? I can't understand this in the case, when I have bug from Copy/Paste procedure. Can you help me :)

Best regards!

Markstein
Joomla! Hero
Joomla! Hero
Posts: 2268
Joined: Sat Feb 09, 2008 8:27 am
Location: California, USA

Re: How to change article background?

Post by Markstein » Sat Jun 02, 2012 7:49 pm

I want every article to have different background color. Personal.css is for all of them, isn't it?
Yes it is.

Option #1
If you want to have a different background color for each article then you could use the Page Class Suffix which you would be adding a new class in your stylesheet for each page class suffix.

http://docs.joomla.org/Page_Class_Suffix
http://docs.joomla.org/Using_Class_Suffixes

You should install and learn how to use firebug. It will help you with customizations. There are 2 video tutorials on the page below.

http://docs.joomla.org/Using_Firebug_Wi ... la_Website

Part 2 shows you how to use the Page Class Suffix. The tutorial uses Joomla 1.5 but the Page Class Suffix is still in 2.5 under the menu items on the right in the Page Display Options tab instead of Parameters (System) in Joomla 1.5.

Option #2
Might be able to use an extension such as this one. I have never tried it but it may be worth a shot.

http://extensions.joomla.org/extensions ... ting/14053

Option #3
If you are using the Article Title set to Show option and you don't mind if the article title is not in the colored area you could just add some inline code in each of your articles which would change the background color on a div. You would enter the following into an article "in HTML mode" and edit the color and "your content here".

Code: Select all

<div style="background: #EEFFFF;">
YOUR TYPED IN CONTENT HERE
</div>
There may be other ways of course but these 3 popped in my head first. I am not sure what you are referring to about a Copy/Paste bug.

Mark

emstanev
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Mon May 21, 2012 7:00 pm

Re: How to change article background?

Post by emstanev » Sun Jun 03, 2012 2:02 pm

Hello Sir,

Thank you very much. I will try this ways of article customization. Option #2 - I try but it is not clear for my case.
Markstein wrote:There may be other ways of course but these 3 popped in my head first. I am not sure what you are referring to about a Copy/Paste bug.
When I type the text manualy, I can change background. After Copy/Paste from my old WEB - this is not possible.

I will see "Page Class Suffix" and I'll try. If I do this sucessfully, I will publish here.

Best regards :)

Markstein
Joomla! Hero
Joomla! Hero
Posts: 2268
Joined: Sat Feb 09, 2008 8:27 am
Location: California, USA

Re: How to change article background?

Post by Markstein » Sun Jun 03, 2012 8:34 pm

When I type the text manualy, I can change background. After Copy/Paste from my old WEB - this is not possible.
If you are copying text from somewhere it is possible that the styling associated with it is also being copied over. if you copy text from another place it's always good to use the Joomla editors "Paste as plain text" option or similar. Or you can copy the text and paste it into Windows Notepad which will strip all styling then copy from Notepad to your Joomla editor.

Mark

emstanev
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Mon May 21, 2012 7:00 pm

Re: How to change article background?

Post by emstanev » Mon Jun 04, 2012 10:58 am

Hello Sir,

Option #3 - this is easy way, when Editor wiht direct HTML access is used. Like TinyMCE :)

Other ways is so complicated. 2 results with different backgrounds:
http://em-stanev.org/index.php/filesdownlod and
http://em-stanev.org/index.php/lessonalink :)

If I learn how to apply gradient, I will be very happy 8) :pop
Any idea?
Best regards !!!

rehan3690
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Wed Apr 20, 2011 11:29 am

Re: How to change article background?

Post by rehan3690 » Mon Jun 04, 2012 1:01 pm


emstanev
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Mon May 21, 2012 7:00 pm

Re: How to change article background?

Post by emstanev » Mon Jun 04, 2012 1:51 pm

Thank you very much :) I will try to implement some of this ideas. Great!


Locked

Return to “Templates for Joomla! 2.5”