Selectors
By Ruben Garcia. Friday, 3. August 2007, 18:35:43
As I told you before, a selector is the part of the page that we're going to modify. Your Opera Blog handles three kinds of selectors: id, type and class.
The id selector (#name) is the one that modifies a certain section of the blog, such as the header, the sidebar or the posts.
#top {
background:#335fa3 url(/community/graphics/themes/top-blue.gif);
border-bottom:1px solid #ddd;
color:#fff;
}
If you take a look at the source of you blog, you'll find something similar to this
<div id="top">
That means that everything between both "divs" will be modified by the #top selector.
The type selector is used to modify a specific HTML tag, within the id selector. To use it you just have to type the tag you want to modify in front of the id selector.
#top h1 {
padding-top:22px;
}
In the example, we are modifying the h1 tag within the #top selector.
Finally, a class selector applies to many elements at once, or a sub-set of specific HTML elements, like the color of the username link (it will only modify such item)
a.username:link, a.username:visited, {
color:#176b9b;
}
As you can see, you can apply style to several selectors at once just by separating them with a comma.
TASK!
Identify the selectors in the CSS of the last post and write down which type they are. On the next post we're going to start having fun!













Randall # 8. August 2007, 13:58
urrrrr so:
#menu {
background:#f8f8f8 url(/community/graphics/themes/menu1.gif);
border-bottom:1px solid #fff;
}
would be a selector? or is just this part: #menu considered the selector?
Ruben Garcia # 8. August 2007, 16:00
The source code are the instructions that your browser follows to display the page.
Only the #menu part is considered the selector, the other parts are the properties and the values, which we'll cover later.
Randall # 8. August 2007, 16:55
The Dark Furie # 18. August 2007, 02:03
If not could we have a large selectors "map" to reference?
. # 8. September 2007, 22:11
http://files.myopera.com/Kite%20Geek/files/Transformers-Banner5Kite.jpg
OK, I have my graphics in my file thingy here in Opera as it shows...
But, when you put in the infor into the CSS design page with ( and ) around it of course
The % of the %20 goes away. O,o And, I can not see the image.
I tried using - , and _ and nothing, and also yousillythingyou. But, nothing has worked... Did I kill it?
Sorry if this is the wrong spot for this. @,*
Violeta Rosales # 8. September 2007, 23:37
. # 9. September 2007, 13:47
It seems that CSS treats the % in from of 20 as nothing. Or, the % is used in another way with CSS... Not sure yet.
But, for now I do have a means to have my own images show.
Sheesh, I thought my basic HTML would help me more. LOL
Louc # 20. September 2007, 08:19
I guess Im having the same problem
http://files.myopera.com/louderf_manila/albums/359088/chalkboardsnap%20copy.png
. # 20. September 2007, 09:15
Randall # 21. September 2007, 02:42
. # 21. September 2007, 12:54
Louc # 21. September 2007, 22:14
Violeta Rosales # 22. September 2007, 03:58
I don't know what's happening with that %20, but i have a solution to all of your problems, the %20 means a "blank space" (wich is not recomended on web sites) so:
louderf_manila: the name of you image is chalkboardsnap copy.png, right??? Well.. RENAME IT to chalkboardsnapcopy.png or chalkboardsnap_copy.png
Louc # 22. September 2007, 04:11
Thank you guys for helping me out
Gracias mi amigos/amigas xD
Violeta Rosales # 22. September 2007, 04:19
De nada amigo!
The Dark Furie # 22. September 2007, 10:35
. # 22. September 2007, 10:42
And, a 1.3mb gif about the size of the reply entry box will not load as a .gif in my blog? It ends up being converted to a .jpg img on the blog, while the image is still stored as a .gif... O,o
I am thinking it has a px size limit I must be over...
But, I can make the same .gif into a Flash movie... and it works and at any size... O,o
The Dark Furie # 22. September 2007, 10:47
Louc # 22. September 2007, 11:46
lolz furie,
brilliant kite xD
. # 22. September 2007, 14:00
And I have yours also
The Dark Furie # 22. September 2007, 14:57
Louc # 22. September 2007, 14:59
Randall # 22. September 2007, 15:27
hmmm... I find I comment twice as much these days
The Dark Furie # 22. September 2007, 18:36
Kite ya twonk.
. # 22. September 2007, 19:57
Yeah I think the red is not cute enough...
Randall # 23. September 2007, 02:48
. # 23. September 2007, 09:20
Louc # 23. September 2007, 21:11
Jenn # 18. December 2007, 09:01
/community/graphics/themes
If I have a gif or another graphic I want to use..Do I make a "directory/folder" in my files where I upload graphics in my account?
I hope I worded that right?
Thanks for help
Randall # 27. November 2008, 19:13
okay that didn't come out right
speaking of "Dummy"
I sound stupid don't I
you know!
Violeta Rosales # 27. November 2008, 19:29
I think that would be:
pre , code {background:#FFFFFF;color:#000000;}
Test it
Randall # 27. November 2008, 20:00
Randall # 27. November 2008, 20:22
hey I didn't envision this group for nuthin!
thanks violetisha
Violeta Rosales # 27. November 2008, 22:06
I added your friend, but it seems to be offline
Randall # 28. November 2008, 02:18
her CSS is basic so it will be a breeze to fix for someone like you
Thanks for everything girl