Two in One Blog Post: Fixing Your Background Photo AND Embedding a PDF on Your Website
I learned two fairly simple things this week for upgrading my website, but I think they both made a whole world of difference with my layout. The first was fixing a photo to the background of each page on my website. When I say “fix” I mean put into a consistent position, as opposed to correct an error, of course.
First, you’ll want to find a cool photograph to act as the background of your website. I chose a picture of a stairway to heaven, since this was relevant to my project themes of spirituality. To set the background photo first, you’ll have to define a background to the body of your website. This can be done with the following code:
The name of your own picture will replace my “stairway” specification. Don’t forget to upload the picture separately!
After establishing your background photo, you can fix it into place with the following code:
If you want your website to look more uniform, simply write this code between the body tags of all of your pages. However, it might also be cool to put a new background photo on each page for an even cooler, customized look.
The next coding trick I learned was embedding pdf files into my website. This was ideal for me because the layout of my site right now just featured brightly colored text on a brightly colored background that wasn’t very kind to non-20-20 readers. Not to mention, the centering of the text looked all wrong and ended up stretching out to ridiculous proportions when maximized on different screens.
To settle this issue, I used a simple code called that embedded the file right from its source. This action is abbreviated with the following code:
<embed src= “revisedProposal.pdf”
You can customize the conventions depending on how the text fits with the layout of your website. I have mine the following specifications:
Don’t forget your closing embed tag!
Just like the picture, you’ll also have to upload the pdf file separately.
Here’s my final result!
– Natalie Russell
~ by Madame Psychosis on October 1, 2012.