|
BeTheBall -> Cascading (4/13/2007 15:34:53)
|
Seems to be the cascading part I just don't get. I have a form with a class of frm. Here is part of my stylesheet that deals with form labels: .frm label, .frm input, .frm select { display: inline-block; margin-bottom: 10px; } .frm label { float:left; margin-right:5px; text-align:right; font-weight:bold; width:200px; } I am trying to overwrite the width and text align values in just one label. So I inserted into that label a class attribute of "wider" and put this in my stylesheet: .wider {width:400px;text-align:left;} However, it still inherits the values from the frm class. [:@] Also, can someone give a quick summary of why some attributes are coded as html element . class name and others are . class name html element? For example, I have a form button in my stylesheet that looks like this: input.submit { background: #E0691A url(../images/submit.gif) no-repeat; border: 0; padding: 4px 0; width: 65px; margin: 0 15px 1px 0; color: #FFF; font: bold 1em Arial, Sans-Serif; } Other items are like this: .bar li { margin: 0; padding: 7px 12px 5px 12px; color: #FFEADC; background: #FF9148; float: left; } What determines where the "." goes?
|
|
|
|