Log in

View Full Version : Editing the style - selection styles


sergioloporto
06-21-2010, 10:00 PM
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
06-26-2010, 07:38 PM
bump

sergioloporto
07-08-2010, 11:03 AM
bump 2

sergioloporto
07-11-2010, 07:59 AM
bump 3

Dead Eddie
07-11-2010, 11:30 AM
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
07-11-2010, 11:46 AM
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
07-16-2010, 07:28 PM
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.