I have created the layout of the website (template). I used Photoshop to design the picture and sliced it to create the div
s. It gave me an HTML file including the HTML and CSS code. I separated these in two files HTML and CSS. The background images were being called inside the <div id="idName">
tags as <img src=...
tags. I changed this. I loaded the images in the CSS file as
idName { background-image: url(URL); }
All the images in the site are loaded like this creating the background as a whole.
Now my question is: Is this a bad practice? because if I leave the images inside the <div>
tags I wont be able to put my content on top of the image. With the background-image
attribute in the css file I can put my content anywhere, not having to worry about the background.