Changing color of the backround?

News Show Pro GK5 - flexible, responsive and easily extendable free Joomla module support forum.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Fri Jul 25, 2014 3:06 pm
Hello,

i`m also using NSP GK5 with Joomla 3.2 and the Game magazine template.

Here is the link: http://suloo.de/hsv3/

I wonder if it would be possible to change the background color of every second article that gets displayed.

The corresponding div would be: div.nspArt.nspCol1 i guess.

Can you think of a way how to achieve this?

For example i want the background of the first article in a light blue, the second should then be white again. Like its often done in various community boards.

thanks a lot!

Cheers Mark
User avatar
Fresh Boarder

GK User
Sat Jul 26, 2014 3:17 pm
Hello,

In this case you should use the selectors which uses the :nth-child feature i.e.:

div:nth-child(even) - will get all even divs
div:nth-child(odd) - will get all odd divs
User avatar
Administrator

GK User
Sat Jul 26, 2014 5:30 pm
Ok, this is basically a very good start thanks. Sadly it also effects all other divs on the page, can you think of a way to only make this for the NSP GK5? Maybe when i create a suffix and load that on the modul?

http://suloo.de/hsv3/

Now it effects also the header, and other divs.

cheers Mark
User avatar
Fresh Boarder

GK User
Sun Jul 27, 2014 12:12 am
Sure now i can go to every second div and recolor it back to the original color in places where i do not want the color change, but this is pretty tedious actualy.

However, i started to do this, wich you can see if you look at my override.css

The main problem i do have now actualy is the header section, wich is colored white now, but i urgently need this in transparent.

Maybe there is a simple way to reduce this odd/even rules only for the NSP GK 5 Modul. That would be awesome.

cheers Mark
User avatar
Fresh Boarder

GK User
Sun Jul 27, 2014 10:14 pm
Ok, got it solved. Using

Code: Select all
div.nspArt.nspCol1:nth-child(even){
background-color: #eef0fd !important;
}



nice! :) thread can be marked as solved!

cheers
User avatar
Fresh Boarder


cron