Showing posts with label CSS. Show all posts
Showing posts with label CSS. Show all posts

Wednesday, March 13, 2013

Multiple classes in css and jquery



.blah1.blah2 are treated differently
in css this is "or" in jquery this is "and"

Tuesday, March 12, 2013

Why CSS matches selectors right to left

Good Answer

CSS precedence

what will happen here?

<head runat="server">
    <title>Untitled Page</title>
    <style type ="text/css"  >
        .testClass{color:red ; font-family:Calibri;background-color:Purple; font-size:xx-small  }
        #testID{color:blue ; font-size:x-large  }
        p {color:Green  ; background-color:Gray; font-size:small }
        html { font-size :xx-large  }  
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <p  class ="testClass"  id = "testID"   >
    dsfsdfdsf<br/>
    sdfsdf<br/>
    </p>
    </div>
    </form>
</body>
</html>

Style overrides ID that  overrides class that overrides element

Thursday, February 21, 2013

Testing CSS Properties When Inherited

testing with javascript is not helpful because it returns "inherit"
JQuery css function likewise returns "inherit"

I used the is function - that works properly

for e.g. $(this).is(":visible")

Thursday, February 7, 2013

Hide Scrollbar in Div with Overflow

overflow-y: hidden;

or

overflow-x: hidden;

Thursday, January 31, 2013

How to make a space in a HTML list

this is how I did it

.space{ margin-bottom :50px;}


<li><i>a</i></li>
<li class ="space"><i>b</i></li>
<li><i> </i></li>

Thursday, November 8, 2012

Color issues

I thought my code for alternate row colors was faulty - or a cascading issue.
In reality - my screen doesn't show the color

e.g. #f6f6f6 

Thursday, May 17, 2012

Visibility in IE

Visibility in IE - make sure you pass valid values and it works fine
also the difference between visibility and display