Man what the fuck is up with custom CSS classes. Here is what I have : #left img { border: 2px solid white; margin-left: 10px; } and .rb { border : 2px solid black; margin-left: 10px; } so, on my left div i have two images. i want one to have a WHITE border and one to have a BLACK border. this isn't fucking brain surgery. so i do one regular image tag. then i do <img class="rb" src="der.jpg"> and what do i get ? two fucking images with a white border. i've been having seriously fucking ridiculous problems with css. i google this shit and do exactly what about 14 thousand different css guides say to do and guess what ? it doesn't fucking work care to explain ? edit : ok, im doing it with inline css styling but really now. why are custom css classes such a pain in the god damn ass.
You did not link to your page, so we cannot tell you exactly what you were doing wrong; we might be able to make a guess, but that's all. Here is a sample page, however, that does what you are looking for. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en-us"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> <title></title> <style type="text/css"> BODY { background-color: silver; color: black } IMG.First { margin: 10px; border: 2px solid white } IMG.Second { margin: 10px; border: 2px solid black } </style> </head> <body> <div> <img class="First" src="http://www.csszengarden.com/001/h1.gif" alt="CSS Zen Garden"> <img class="Second" src="http://www.csszengarden.com/001/h1.gif" alt="CSS Zen Garden"> </div> </body> </html> HTML:
What you posted shows only one of the two images you are working with. It is also possible that an error elsewhere may cause these rules to be ignored or misinterpreted. (And the example I gave you works.) Like I said: Post the full page; otherwise there is nothing we can do for you.