...

View Full Version : relative position and blank space



Maurizio1230
11-24-2009, 08:59 AM
As drhowarddrfine told me right:

Using position:relative means the element can be moved from its original location but the original location is preserved.

This code creates a big blank region:

<img src="/front/images/home/curl_center.png" alt="" style="width:883px; height:49px; position:relative;" />
<div style="background: url(front/images/home/curl_left.png) no-repeat; position:relative; top:-49px; left:-17px" />
<div style="background: url(front/images/home/curl_right.png) no-repeat; position:relative; top:0px; left:900px;" />

as you can see on http://hostinvent.com (user:test; pass:test)
I'm going crazy :(.

Thank you very much for your great help.

Excavator
11-24-2009, 09:07 AM
Hello Maurizio1230,
You're moving it over 900px... I don't know why.
Wouldn't this work better? <div style="background: transparent url(front/images/home/curl_right.png) no-repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; position: relative; top: 0px; left: 18px;">

oesxyl
11-24-2009, 09:16 AM
As drhowarddrfine told me right:


This code creates a big blank region:

as you can see on http://hostinvent.com (user:test; pass:test)
I'm going crazy :(.

Thank you very much for your great help.


<img src="/front/images/home/curl_center.png" alt="" style="width:883px; height:49px; position:relative;" />
<div style="background: url(front/images/home/curl_left.png) no-repeat; position:relative; top:-49px; left:-17px" />
<div style="background: url(front/images/home/curl_right.png) no-repeat; position:relative; top:0px; left:900px;" />

remove left: 900px from the last element and left: -17px from previous and I guess will work.

best regards

Maurizio1230
11-24-2009, 09:29 AM
If I remove "left" from the first and/or from the second div, as you can see, these 3 images doesn't assume the right position for composition.

It should be like attached image and without blank space after it.

Thank you very much for your help. If you need a quality hosting, tell me :)

oesxyl
11-24-2009, 09:39 AM
If I remove "left" from the first and/or from the second div, as you can see, these 3 images doesn't assume the right position for composition.

It should be like attached image and without blank space after it.

Thank you very much for your help. If you need a quality hosting, tell me :)
this have 919px width and your container 883px. You must split in three parts,
left and right as fixed backgrounds, middle a chunk of 5px width( use repeat-x. to fill it).

best regards



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum