i am learning css.can any body tell me the meaning of this things: .mainmenubg { background-image: url("http://funzec.net/images/bgmainmenu.gif"); BORDER: #55B953 1px solid; color: #9D0202; } Code (markup): in above code what is the color: #9D0202; stands for ? Also what is the meaning of margin: 0 5px 5px 0; (i think i know it is border distance from border top,bottom,right and left) in below code: .menumain { display: block; background: #FFFFFF; border: 1px solid #CC6633; padding: 3px; margin: 0 5px 5px 0; width: 211px; } Code (markup): Please reply
The first is : CSS style class named : mainmenubg and the info included is all the styles & colors type & border menu type and the background images URL ! and the sec things is too CSS style class named : menumain yes it is the distance between that Object in your Page where they putted in ! like when they putted in a small table , and your menu there : the margin will be the distance between each space in the TOP & LEFT & RIGHT & BUTTOM thoses all is a CSS styles types & you can customize your website from this Options , and you will look at it more better , when you will use a good software edited the css & Xhtml files Thanks .
in the first code, #9D0202 stand for the text color. at the second code, "margin: 0 5px 5px 0;" mean: top distanse from the div: 0px right distanse from the div: 5px bottom distanse from the div: 5px left distanse from the div: 0px hope I helped you
Red, green, Blue, in hexadecimal - since each color gets two digits, that's 8 bits, or 0..255. 0x9D - 157 red 0x02 - 2 green 0x02 - 2 blue. Frankly, that's so little green and blue I'd not bother, and the red is close enough I'd use three digit hex colors instead - #900, which is the same as #990000 Think of it like a palette in art - just with light instead of pigment. Remember how in pigments red+blue = purple, blue+yellow = green - well, technically in pigments the 'true' colors are cyan, magenta and yellow. In pigments: magenta + yellow = red yellow + cyan = green cyan + magenta = blue magenta+yellow+cyan = black (in THEORY, it's hard to get true pigments at high enough saturation, so you get more of a muddy purple/brown - which is why in print they also include a black, usually represented by the letter K - hence CMYK) With light, like on a computer display or projector, the exact opposite colors must be used, which you combine to 'reverse' the formula. The reason for this is that pigments reflect just certain parts of the spectrum, absorbing others - as such you need to add the elements to reflect the colors you want - with light you are working with the colors directly, so it's the opposite wavelengths - red, green and blue. red + green = yellow green + blue = cyan blue + red = magenta red + green + blue = white Unlike pigments, it's fairly easy to get light to the exact spectrum, so you CAN create a convincing white by combining all the colors. So by mixing your colors in certain proportions, you can recreate the spectrum just like you would with paints - it's just your base elements are different. Correct, the order is clockwise starting at the top. Margin 0 5px 5px 0; is the equivalent of margin-top:0; margin-right:5px; margin-bottom:5px; margin-left:0; When using that method, if you omit the 'opposite' side, it is assumed to be the same. margin:0 5px 5px; is the same as: margin-top:0; margin-right:5px; margin-bottom:5px; margin-left:5px; While margin:0 5px; is the same as: margin-top:0; margin-right:5px; margin-bottom:0; margin-left:5px; That shorthand can be used on padding and borders as well.