I am not a webdesigner, by any means, but as a fairly new company I lack the funds to hire a firm.
I am dissatisfied with my website's overall appearance and mostly slow loading performance.
One of the ways I would like to reduce the load time, is to change some items to a single background image, that will be used within 4 blocks, showcasing my poducts.
I am not very confortable working within CSS, and would prefer a method to use a background image, within a block, using HTML or PHP code.
Can I use something like the following example, to perform my desired function?

<style type="text/css">
body{
background-image:url('<?php echo $profpic ;?>');
}
</style>

Comments

RKS’s picture

I don't fully understand what you're asking, but could you put the html+css in the block itself and use "full html" as the format?

edrupal’s picture

Hi,

If you wanted to go down this route you could add your code to the appropriate template file (e.g. node.tpl.php or block.tpl.php), however I would strongly recommend you persevere with CSS as in the long run you'll find it much easier to manage the look and feel of your website.

Ed

devtherock’s picture

Yes sure you can. But I would prefer to use background image in .css file if background images isn't dynamically changeable.

ryangambito’s picture

As long as you're block content is in a php format.