Warning: include(/home/.lurky/jenni/star-girl.org/skins/cookiecheck.php) [function.include]: failed to open stream: No such file or directory in /home/jenni/star-girl.org/pages/tutorials/website/intermediate/divs.php on line 1

Warning: include() [function.include]: Failed opening '/home/.lurky/jenni/star-girl.org/skins/cookiecheck.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/jenni/star-girl.org/pages/tutorials/website/intermediate/divs.php on line 1

Warning: include() [function.include]: Filename cannot be empty in /home/jenni/star-girl.org/pages/tutorials/website/intermediate/divs.php on line 2

Warning: include() [function.include]: Failed opening '' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/jenni/star-girl.org/pages/tutorials/website/intermediate/divs.php on line 2
DIVs


DIVs are great to use because they can be viewed in nearly all browsers and can also help with image loading times. However, they are a pain to put on every page if you use HTML, and they can also take ages to position. But they're worth trying at least once for a different look :)

1. Copy and paste the code below into a page of your site and save, then open it back up:



2. Okay now I'm going to explain what it all means. The 'YOUR TEXT' bit and the closing of the div tag are fairly obvious, but here's the rest:



3. If you want a background image instead of a colour, replace the background-colour bit of your code with this:



Click here to see an example of a page I made using DIVs (please note that the page I've linked to is part of my college coursework and may not be copied or reproduced in any way, including images, text AND HTML code :)
Warning: include() [function.include]: Filename cannot be empty in /home/jenni/star-girl.org/pages/tutorials/website/intermediate/divs.php on line 22

Warning: include() [function.include]: Failed opening '' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/jenni/star-girl.org/pages/tutorials/website/intermediate/divs.php on line 22