Jump to content

Some CSS lines I dont recognize


Recommended Posts

I was lookin at a couple decent websites to see hwo they did some stuff in their CSS... getting inspiration and looking for stuff I dindt know how to do... anyway I came across 2 things in the CSS I didnt understand. [class*=span] which im guessing is a wildcard, but I had thought wildcards in CSS were impossible. So I figured Id ask here to see if there are some sort of rules or incompatibilities with this. The 2nd thing I came across was small in the css such as this: h1 small{ color...}h2 small{...}h3 small{...}p small {...} I know you can use small to descibe a fontsize, as well as a <small> in the html, but I dont get what is being accomplished here... its probably something simple I just never thought of it this way so I figured id ask and see if I cant learn somthin new. Sorry if these are remedial questions, but I figure if I never ask I wont learn. Thank you.

Link to post
Share on other sites

CodeName has a point. Most of the code you'll see will be difficult to or impossible to understand until you do the tutorials and start writing code yourself. In fact, you, mostly likely, will never use most of the code you study (at least not for a while). So, learn the basics, prove to yourself and others you can write basic code and you'll get all the help you need here. Demonstrating basic skills and doing your best to do it yourself is the price of admission. It my seem like that's unnecessary, but there's a limit to how many short cuts you can take without dragging the people that want to help you on a bumpy ride. The simple fact is using someone else's code when you have weak coding skill's usually takes too much time, IMO.

Edited by niche
Link to post
Share on other sites

h1 small{color:red;} bold part is selector. it selects the nodes which you want to get styled. inside curly braces you will put styling information. 'h1 small' tells select small tag which is inside h1 tag and it will make 'red' and [class*=span] is not wild card. check the page linked to read more information.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...