HTML and CSS Reference
In-Depth Information
5.
now invoke this by adding this script element at the end of the Index.cshtml file,
after the footer element and just before the body closing tag.
<script>
if (!Modernizr.borderradius) {
$("nav").corner("15px");
$("footer").corner("25px");
}
</script>
6.
This code uses the jQuery selector to find the nav and footer elements and calls
the corner() method specifying the radius.
7.
Save your changes and press F5 to debug your application. Switch the browser
mode to iE7 and your page should look like Figure 7-10 .
Figure 7-10. The Demo page with rounded corners
Adding Gradients
Next, you'll add a gradient background to the intro section using another open source solution from PIE
(progressive internet explorer). This is implemented as an HTC file just like the table support that you added
earlier. Once you have downloaded the component, you simply invoke it using the behavior property of your style
sheet rule.
eXerCISe 7-4. aDDING BaCKGrOUND GraDIeNtS
1.
go to the http://css3pie.com site and click the download button. This will
download a PIE-1.0.0.zip file (you may see a different version number; just
download the latest version).
2.
There are several files inside this .zip file. Copy the PIE.htc file to your Chapter 7 \
Content folder.
 
Search WWH ::




Custom Search