PDA

View Full Version : Editing the style - selection styles


sergioloporto
22 Jun 2010, 00:00
Hello,

I would like the texts of the posts and threads of the forums [not titles, only texts] to have a different color when selected/highlighted with the mouse.

The same for the text of the articles of the CMS [appearing in the article page itself, and in the general content.php page].

The same for the text of blog posts/comments.

Please tell me if:

there is a safe way to add the code so that when a new VB version will be released I don't have to copy and paste manually the new codes.

Please tell me how and where I can change the code.


I know that I have to add this to the parapgraphs:

::-moz-selection{
background:#cc0000;
color:#fff;
}

::selection {
background:#cc0000;
color:#fff;


please help

sergioloporto
26 Jun 2010, 21:38
bump

sergioloporto
08 Jul 2010, 13:03
bump 2

sergioloporto
11 Jul 2010, 09:59
bump 3

Dead Eddie
11 Jul 2010, 13:30
Try adding this to your additional.css template:

.postcontent::selection{
background:#cc0000;
color:#fff;
}

.blogcontent::selection{
background:#cc0000;
color:#fff;
}

.postcontainer::selection{
background:#cc0000;
color:#fff;
}

.postcontent::-moz-selection{
background:#cc0000;
color:#fff;
}

.blogcontent::-moz-selection{
background:#cc0000;
color:#fff;
}

.postcontainer::-moz-selection{
background:#cc0000;
color:#fff;
}

Should work until vB decides to change those classes.

sergioloporto
11 Jul 2010, 13:46
Hi!! It works fine!! Thank you...

however it works only for normal text... if it is cursive or bold it doesn't work.

If I leave .postcontent::selection{
background:#cc0000;
color:#fff;
}

it is applied to normal text only.

if I put:

.postcontent b i::selection{
background:#cc0000;
color:#fff;
}
it is applied to bold italic text only...

if I put

.postcontent b::selection{
background:#cc0000;
color:#fff;
}

it is applied to bold only...

what should I put if I want it applied to each styles (bold, italics, normal)?

sergioloporto
16 Jul 2010, 21:28
In the end I decided to apply it to all the text of all VB CMS, and put:

*::selection{
background:#cc0000;
color:#fff;

*::-moz-selection{
background:#cc0000;
color:#fff;



Why it works only in FireFox?
I would like it to work also in Chrome and Opera. According to CSS3 it should work.