02.06.2013 Views

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

172<br />

CHAPTER 5 ■ ADD CONTROLS TO CREATE, EDIT, AND DELETE EVENTS<br />

?><br />

<br />

<br />

<br />

<br />

After saving this code, navigate to http://localhost/admin.php to see the resulting form (see<br />

Figure 5-1).<br />

Figure 5-1. The form before adding any CSS styles<br />

Adding a New Stylesheet for Administrative Features<br />

Obviously, the preceding form needs some visual enhancement to make it more usable. However, this<br />

form will ultimately be accessible only to administrators (because you don’t want just anyone making<br />

changes to your calendar), so the CSS rules will be separated out to a separate stylesheet called<br />

admin.css. You can find this file in the css folder (/public/assets/css/).<br />

Again, since this book is not about CSS, the rules won’t be explained. Essentially, the following CSS<br />

makes the form elements look more like what your user expects a form to look like; it also adds a couple<br />

rules for elements that will be created shortly.<br />

Now add the following code into admin.css:<br />

fieldset {<br />

border: 0;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!