tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luke Scholefield <...@me.com>
Subject Re: How to specifiy a background image in a tile?
Date Wed, 02 Sep 2009 14:18:24 GMT
You could also specify the background image using the style attribute  
in the table tag:

<table style="background-image: url(img.jpg)" >

This would let you specify it by page, where as just using an external  
style sheet would not.

<table style="background-image: url(<tiles:insertAttribute  
name='backgroundimg'/>)" >

Of course, if you are only specifying single image (or even a few, use  
different styles), it would  be better to do it as a style sheet.  If  
it does change that much, it would seem more appropriate to use it as  
a JSP/JSTL tag.

Not sure if this is poor form in terms of coding standards, but it  
should work.

On 02/09/2009, at 10:47 PM, Griffith, Michael * wrote:

> Create a style in your CSS that has a background image:
>
> sidebar {
> 	margin: 0;
> 	padding: 0;
> 	background-image: url(../images/background.png);
> }
>
> then assign the css style to the div using the class attribute:
>
> <div class="sidebar">
> 	<table...>
> </div>
>
>
> -----Original Message-----
> From: measwel [mailto:marek_karczewski@yahoo.com.au]
> Sent: Wednesday, September 02, 2009 8:08 AM
> To: users@tiles.apache.org
> Subject: Re: How to specifiy a background image in a tile?
>
>
> Maybe it would be better to do it with a stylesheet? What would you
> choose?
> If so, how can it be done ?
> --
> View this message in context:
> http://www.nabble.com/How-to-specifiy-a-background-image-in-a-tile--tp25
> 251708p25257150.html
> Sent from the tiles users mailing list archive at Nabble.com.
>


Mime
View raw message