P.Z. Low Cost CPanel Web Hosting  

Go Back   P.Z. Low Cost CPanel Web Hosting > Page-Zone Web Hosting Main Forum > General Discussion

General Discussion Anything which doesn't fit into the specific topics above. Posting limited to registered members.

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
CCS help - FIXED!
Old
  (#1 (permalink))
midwest
blink and it's over
midwest will become famous soon enough
 
midwest's Avatar
 
Status: Offline
Posts: 802
Join Date: Oct 2002
Location: Big Sky, MT
Rep Power: 78
CCS help - FIXED! - 05-24-2007, 01:53 PM

Edit:
Got it figured out. I needed to position the div I used as a container. I used a bare inline position:relative.

>>>
Need a CSS guru.

I'm having a CSS problem that I think has to do with z-index and the div I use as a container. Here is the code

Code:
<div>
<img src="<?=$imgUrl?>/state/temps/<?=$statename?>.gif" border=0>
<?php

foreach ($state_data as $key => $value)
{
//echo "KEY::$key - VALUE::$value<br>";
list($junk,$temp)=explode('|',$value);

//$city1 = preg_replace('/ /', '_', $city);

$ww1 = $coords[$key];
list($top,$left)=explode('|',$ww1);

echo '<span style="font-size: 24px; color: #FF0000; z-index:10; position:absolute; top:';
echo "$top";
echo '; left:'; 
echo "$left";
echo ';">';
echo "<b>$temp&deg;</b>";
echo "</span>\n";
}
?>
</div>
As you can see I am positioning spans inside of a div. This works just fine
Index of /templates from a bare template (map_stateName.php)
or a pop-up window
InstaGuide Weather - - State_maps Page

But when I try to include the template within the content area of the site the spans fail to position even though the top and left coords are correct. The spans show up next to the graphic as if they were not even referenced with top/left.

So, how and what do I clear or whatever to get absolute positioning to work? I've been beating at this for a day and a half. It is one of the few things I have not been able to work out on my own. ARRGHHH!

TIA
Ronnie


Ronnie Gauthier
www.instaguide.com

======================
for official page-zone support please visit
www.page-zone.com/support.shtml
   
Reply With Quote
Old
  (#2 (permalink))
david
Registered User
david will become famous soon enough
 
Status: Offline
Posts: 92
Join Date: Jun 2002
Location: London, England
Rep Power: 44
05-27-2007, 02:17 PM

Could you post the html as it appears if you view source on the rendered page?
All I can make out here is that <span> is intended for use for formatting rather than positioning so it might be better to use another <div> for the positioning with a <span> in that for formatting.
Also, absolute positioning is still relative to the container, so your <span> is positioning relative to the <div>


David
See my YouTube Theatre
http://www.youtube.com/spogley
   
Reply With Quote
Old
  (#3 (permalink))
midwest
blink and it's over
midwest will become famous soon enough
 
midwest's Avatar
 
Status: Offline
Posts: 802
Join Date: Oct 2002
Location: Big Sky, MT
Rep Power: 78
05-27-2007, 02:27 PM

David,

Thanks for the reply. I have got it fixed. The span does the positioning. I just needed to set a position:relative in the div container, guess the spans needed that to know where they were to go. It worked fine alone but needed the div referenced when included into an existing page.

Thanks
Ronnie

.


Ronnie Gauthier
www.instaguide.com

======================
for official page-zone support please visit
www.page-zone.com/support.shtml
   
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Live Help



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC6
vBulletin Skin developed by: vBStyles.com
Copyright © 2002 Page-Zone Web Hosting. All rights reserved.
Smilies provided by Crack's Smilies http://www.mysmilies.com