CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 22nd, 2001, 11:42 AM
mcwinterr mcwinterr is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Posts: 12 mcwinterr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation

hey, just wondering if anyone has any solutions to my problem:

within a <td> table cell on my page, i have several relatively positioned div's that contain images. i want these images to be positioned right next to each other. the code below works (using negative positioning), but since the position: relative style property places objects on top of each other, i had to position the div's using negative values.

the problem with this is that although everything positions perfectly in all browsers, since there are multiple div's being positioned within this one <td> table cell, there is a lot of "ghost" space that is still visible. it's just like there is extra white space extending the <td> cell higher than the 17 pixels it is supposed to.

i have tried adding the display: inline style property to the div's and this does work, but this property is only supported by ie5 mac/pc.

i would rather hash this out using relative positioning instead of absolute, so any solutions you guys might have would be great...thanks in advance!

** code **

<tr>
<td width="100%" height="17" valign="top">
<div id="mainNavAbout" style="position: relative; left: 0px; top: 0px;">
<img src="images/00_nav_about_n.gif" width="46" height="17"></div>
<div id="mainNavPrograms" style="position: relative; left: 47px; top: -17px;">
<img src="images/00_nav_programs_n.gif" width="68" height="17"></div>
<div id="mainNavApply" style="position: relative; left: 116px; top: -34px;">
<img src="images/00_nav_apply_n.gif" width="45" height="17"></div>
<div id="mainNavEmployers" style="position: relative; left: 162px; top: -51px;">
<img src="images/00_nav_employers_n.gif" width="71" height="17"></div>
<div id="mainNavAlumni" style="position: relative; left: 234px; top: -68px;">
<img src="images/00_nav_alumni_n.gif" width="53" height="17"></div>
<div id="mainNavBlueBar" style="position: relative; left: 288px; top: -85px;">
<img src="images/00_blank_blue.gif" width="251" height="17"></div></td>
</tr>

[Edited by mcwinterr on 01-22-2001 at 10:45 AM]

Reply With Quote
  #2  
Old January 23rd, 2001, 07:03 PM
oskar oskar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: Copenhagen, DK
Posts: 231 oskar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 39 m 35 sec
Reputation Power: 13
What's the problem?
If you want the images to be positioned right after each other, you just write the code
<img src="picture"><img src="picture"><img src="picture">
next to each other.
Steffen

Reply With Quote
  #3  
Old January 23rd, 2001, 09:13 PM
mcwinterr mcwinterr is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Posts: 12 mcwinterr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
uh, the problem is that your solution places the images right next to each other, with no spacing...i want to control the spacing between the images...

Reply With Quote
  #4  
Old January 24th, 2001, 01:53 PM
deviant deviant is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 27 deviant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
no solution for your CSS problem ...
but I suggest using a transparent image with varing width for spacing between objects ... that wasy you can be 100% sure it's cross-browser effecient.

--deviant

Reply With Quote
  #5  
Old January 24th, 2001, 04:01 PM
oskar oskar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: Copenhagen, DK
Posts: 231 oskar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 39 m 35 sec
Reputation Power: 13
You can use <img src="picture" hspace="10" vspace="30"> to get the exact space that you want!
Steffen

By the way: with this solution, you can drop all those div's

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > css - relative positioning problem

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap