Position Christmas bells on header1-module

Demonstrate your product attractively using clean and distinctive coffe shop Joomla template.
GK User
Mon Dec 10, 2012 4:33 pm
I created a style3, a christmasstyle for the coffe-template. Everything looks fine, except one thing:
I want to display a picture with christmasbells a the lefttop of the header1-module.
To to that I used this code (style3.css):
Code: Select all
#gkHeaderModule1::before {
   content: url('../images/style3/decoration_left.png');
   left: 410px;
   position: absolute;
   top: 220px;
   z-index: 1;


The problem is that the christmar not on the same place on every screenresolution.
example when it's ok:
Image

example, seen with another screenresolution:
Image

Is there a way, to get the picture always on the same place?
User avatar
Junior Boarder

GK User
Mon Dec 10, 2012 6:35 pm
Hi,

yes, but you have to set the position: relative to the container with the main template content and the bells and then you should set the left property to 0 or a little bit negative value i.e. -20px.

Currently the bells are positioned to be 410 pixels from the left side what cause your problem.
User avatar
Administrator

GK User
Mon Dec 10, 2012 7:02 pm
dziudek wrote:Hi,

yes, but you have to set the position: relative to the container with the main template content and the bells and then you should set the left property to 0 or a little bit negative value i.e. -20px.

Currently the bells are positioned to be 410 pixels from the left side what cause your problem.


Thank you for your quick response. The xmasbells are now at the right position but for some reason, the header1-module is below the xmasbells.

I used this code:
Code: Select all
#gkHeaderModule1::before {
   content: url('../images/style3/decoration_left.png');
   left: -20px;
   position: relative;
   top: -20px;
   z-index: 1;


This is the result:
Image

The URL of the testsite is http://www.marcbogaert.be/ooievaar
User avatar
Junior Boarder

GK User
Mon Dec 10, 2012 7:05 pm
You have understand me wrong - please put position: relative for the #gkHeader element and use position: absolute for the bells ;)
User avatar
Administrator

GK User
Mon Dec 10, 2012 7:19 pm
Ooops, my mistake.

Changed the code into this fixed the problem:
Code: Select all
#gkHeader {
   position: relative;
}
#gkHeaderModule1::before {
   content: url('../images/style3/decoration_left.png');
   left: -40px;
   position: absolute;
   top: -55px;
   z-index: 1;
}


Thank you for your help!
User avatar
Junior Boarder


cron