niche Posted May 17, 2012 Share Posted May 17, 2012 (edited) What's the notation for the CSS for all the IDs the begin with: itemInfo? #itemInfo???? Can it work that way? Edited May 17, 2012 by niche Link to comment Share on other sites More sharing options...
eTianbun Posted May 17, 2012 Share Posted May 17, 2012 [id^=itemInfo] 1 Link to comment Share on other sites More sharing options...
niche Posted May 17, 2012 Author Share Posted May 17, 2012 That's the way to define the ID selector? Link to comment Share on other sites More sharing options...
ShadowMage Posted May 17, 2012 Share Posted May 17, 2012 That's how this page shows it. Technically, though, the ID selector is #. What CodeName is showing you is an attribute selector. The attribute in this case happens to be the ID. 2 Link to comment Share on other sites More sharing options...
eTianbun Posted May 17, 2012 Share Posted May 17, 2012 (edited) That's how this page shows it. Technically, though, the ID selector is #. What CodeName is showing you is an attribute selector. The attribute in this case happens to be the ID. In addition, An ID selector, targets just the ID attribute, while attributes selector, targets any specified attribute. Edited May 17, 2012 by CodeName Link to comment Share on other sites More sharing options...
niche Posted May 17, 2012 Author Share Posted May 17, 2012 I may not be following you. Are you saying is how to define the style for all IDs beginning with: itemInfo? <style type="text/css">[id^=itemInfo] { position:absolute; background-color: yellow; width: 300px; height: 50px; margin: 0px 0px 0px 105px;}</style> Link to comment Share on other sites More sharing options...
eTianbun Posted May 17, 2012 Share Posted May 17, 2012 YES! Is it working for you or NOT? Link to comment Share on other sites More sharing options...
niche Posted May 17, 2012 Author Share Posted May 17, 2012 (edited) Yes. Thanks. How did you know where to use that ref that way? Edited May 17, 2012 by niche Link to comment Share on other sites More sharing options...
eTianbun Posted May 17, 2012 Share Posted May 17, 2012 :/ you forgot to remove display="none" right? Link to comment Share on other sites More sharing options...
niche Posted May 17, 2012 Author Share Posted May 17, 2012 It worked. I forgot to change the id reference in the JS. Thanks to CodeName and ShadowMage for their help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now