styling background image

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

styling background image

Postby jdbruijn » Thu Oct 14, 2010 2:09 pm

I want a background image (that has a wave patern) to be set as repeat to fill the entire height of my menu form.
I added label to my form and anchored it to top,bottom and left. This label has default settings and a special styleClass, that style class has the following definition:
Code: Select all
label.golf_verticaal
{
   background-repeat: repeat-y;
   background-image: url(media:///golf_verticaal.png);
}
label
{
   color: #5c5c5c;
   border-style: none;
   font: bold 10pt Verdana;
   text-align: center;
}

However when I run this in my webclient (using FireFox) than the image is not repeated. Using Firebug I noticed that the following top-most style was overruling my style class:
Code: Select all
element.style {
background-image:url("resources/servoy/media?id=golf_verticaal.png&s=pron&l=697963613");
background-position:center center;
background-repeat:no-repeat;
white-space:nowrap;
}


What am I missing here? Is the repeat setting in CSS not supported? Because looking a bit closer I noticed that it is never used, not even in the menu bars that have background image with 1px width. It seems that it is stretching that image instead of using a repeat-x or repeat-y styling.

Jos
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: styling background image

Postby Harjo » Thu Oct 14, 2010 3:58 pm

as far as I know, this does not work in 'servoy-styles' : background-repeat: repeat-y;

you have to do that on the element itself, media properties: reduce & enlarge, without aspect ratio..
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: styling background image

Postby jdbruijn » Thu Oct 14, 2010 4:12 pm

Setting the media properties to Reduce/Enlarge does not make the image repeat itself, but it stretches the image instead.
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: styling background image

Postby Harjo » Thu Oct 14, 2010 4:25 pm

ah I see what you mean, we use 1px images, for gradients etc...
than you cant see the difference between stretch & repeat....

repeat is than indeed not working... did you filed a feature request?
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: styling background image

Postby jdbruijn » Thu Oct 14, 2010 5:03 pm

Not yet, I thought i was doing somehting wrong.
But I will make a case for it.
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm


Return to Web Development

Who is online

Users browsing this forum: No registered users and 2 guests