CRO8 Posted August 17, 2004 Posted August 17, 2004 hello just curious about two things: 1. when setting style sheets, I have seen it written in two ways, div#blahblah and #blahblah so what is the difference if there is one? thanks! Quote
borfast Posted August 17, 2004 Posted August 17, 2004 (edited) If you use div#blahblah, that style will only be applied to <div> tags with the id "blahblah" but if you use #blahblah, that style will be applied to any tag that has the id "blahblah" - although theoretically that wouldn't happen, because an id should be unique, meaning you shouldn't have two elements with the same id in the same page. Edited August 17, 2004 by TCH-Raul Quote
CRO8 Posted August 17, 2004 Author Posted August 17, 2004 ok gotcha thanks. div#blahblah would only be <div id="blahblah"> as opposed to #blahblah which can either be <div id="blahblah"> or <table id="blahblah"> correct? Quote
jhollin1138 Posted August 20, 2004 Posted August 20, 2004 ok gotcha thanks. div#blahblah would only be <div id="blahblah"> as opposed to #blahblah which can either be <div id="blahblah"> or <table id="blahblah"> correct? I was wondering the same thing. Now I am starting to understand this whole CSS thing. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.