CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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 June 24th, 2001, 03:25 AM
ghopper ghopper is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Location: UK
Posts: 7 ghopper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
CSS and wrapping

Hi there,

couldn't find any threads here that solve my current CSS problems.

Anyway, I've got a DIV with 3 images which is 400px wide for example. As soon as I resize the browser to below 400px width the images inside the DIV begin to shift downwards.

CSS :

Code:
#header {
position: absolute;
top : 26px;
left: 0px;
width: 400px;
height: 98px;
border-bottom: 1px solid #777777;
border-top : 1px solid #777777;
}


How can I turn this off, i.e. I want the images to stay where they are.


Also, writing HTML like this :

<div>
<img src="file1" />
<img src="file2" />
</div>

produces gaps between the images. To get rid of the gaps I have to write it like :

<div><img src="file1 /><img scr="file2 /></div>

But this is of course not as readable as the first method.

Is there a fix for this


thanks alot

Reply With Quote
  #2  
Old June 24th, 2001, 06:39 AM
epl epl is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Dublin
Posts: 413 epl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 18 sec
Reputation Power: 8
I'm not sure (without some code) exactly what's going on, but I think you could get around what you describe by putting a small, wide transparent gif some where in your doc - effectively setting a minimum width for the doc...
Code:
<img src=clear.gif width=400 height=1 border=0 alt=0>

Reply With Quote
  #3  
Old June 24th, 2001, 06:59 AM
ghopper ghopper is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Location: UK
Posts: 7 ghopper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
cheers,

but I'm trying to write W3C compliant pages and I've read that with CSS there is no need for transparent pixels anymore

Anyway here's the code:

Code:
#header {
    position: absolute;
    top : 26px;
    left: 0px;
    width: 100%;
    height: 98px;
    border-bottom: 1px solid #777777;
    border-top : 1px solid #777777;
}
---------------------------------
<div id="header" class="gray"><img src="images/header_img.jpg" alt="" /><img src="images/logo.gif" alt="" /><img  src="images/tags.gif" alt="" /></div>


As soon as I resize the browser window the images shift to fit in the browser width. Also notice that I wrote the <div> all on one line, otherwise the div doesn't render properly, i.e. the gaps between the images.

Is this a bug or isn't any whitespace allowed between the <img> tags, if you want the images to appear one after the other ( horizontally without any gaps )

thanks again

Reply With Quote
  #4  
Old June 24th, 2001, 08:16 AM
ghopper ghopper is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Location: UK
Posts: 7 ghopper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
OK,

found some answers. Basically I have to use following style :

white-space: nowrap

But this doesn't work in IE5. So in IE5 I have to use
<nobr></nobr>

But this on the other hand isn't HTML4.01 compliant. Is there another workaround that is still W3C compliant ?


Also still haven't found an answer to my 2nd problem, i.e. the need to write a <div> which contains <img> all on one line, to avoid gaps between the images.


cheers

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS and wrapping


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway