473,434 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

CSS Floats Images and IE (Help please!)

Daz
Hello hello!

I'm trying to finish off putting my design into HTML and I've come
across a problem that I can't get my head around.

I've got divs floating in two columns, but I'm having problems trying
to put in images and floating them left or right. In safari it leaves a
gap inbetween two of my divs and the image overlaps the gap, in IE it
does the same unti you mouse over the hyperlink in the div, which then
hides the gap and puts the div below over the one above it. Is this
making sense?

Anyway, if someone can give it a once over and spot somethign that I'm
doing wrong that would be brill!

www.dazhall.com/index.htm
www.dazhall.com/css/screen.css

Ta!

Daz.

Sep 4 '05 #1
9 1587
Daz wrote:

I've got divs floating in two columns, but I'm having problems trying
to put in images and floating them left or right. In safari it leaves a
gap inbetween two of my divs and the image overlaps the gap, in IE it
does the same unti you mouse over the hyperlink in the div, which then
hides the gap and puts the div below over the one above it. Is this
making sense?

No. I do not see any of the behavior you describe.
Which divs? Which images?
BTW, did you see the thread "A plea: where are the links?"

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Sep 4 '05 #2
Daz
No. "A plea: where are the links?" is nothing to do with my problem.

I'm using IE6, Windows XP SP2. On www.dazhall.com/index.htm you will
see a title in orange "Wing Commander Watch", below this title is some
lipsum text and an image with a right float applied via
www.dazhall.com/css/screen.css. The div structure is as follows:

<div id="content-first">
<div class="copy">
<h2>Wing Commander Watch</h2>
<p><img src="..." class="right-top" />"Lorem ipsum dolor sit
amet....</p>
<p><a href="/cadets/articles/?id=101">Continue
Reading...</a></p>
</div>
</div>

There is then another div ("content-feature") below of a similar
structure with the title "Feature". The problem is that the image
overlaps the "content-first" div, whereas it should be contained within
it. The plot thickens when you mouse over the "Continue Reading..."
hyperlink, which makes the space dissappear and the "content-feature"
div move up.

In Firefox (Win & Mac) and Safari the gap is still there, but the
strange hyperlink behaviour is not. The end result I am l;ooking for is
to get the image to sit within the div, without it overlapping. This is
almost certainly a problem with clearing floats, but I can't seem to
find it.

I hope this clarifies!

Daz.

Sep 4 '05 #3
Daz wrote:
No. "A plea: where are the links?" is nothing to do with my problem.
True. It does give you a hint about usability.
You also do not have a DOCTYPE, and the HTML has a number of validation
errors.
There is then another div ("content-feature") below of a similar
structure with the title "Feature". The problem is that the image
overlaps the "content-first" div, whereas it should be contained within
it. The plot thickens when you mouse over the "Continue Reading..."
hyperlink, which makes the space dissappear and the "content-feature"
div move up.
The :hover problem is due to ".copy a:hover {border-bottom: 1px solid
#FF5126;}". Remove the border-bottom and the size change does not happen.
This leaves the problem of the gap the IE puts at the bottom of the
content-first div. I believe this is the IE "peekaboo" bug. Search for it.
A way around the problem is to put the <img> in its own <p>.
In Firefox (Win & Mac) and Safari the gap is still there, but the
strange hyperlink behaviour is not.

No, it is not. Not in either Firefox or Opera7 (win2k).

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Sep 5 '05 #4
Daz wrote:

The plot thickens when you mouse over the "Continue Reading..."
hyperlink, which makes the space dissappear and the "content-feature"
div move up.
I believe that this is due to Collapsing Margins badly handled by IE. By
introducing a border with hover, IE (5.5 tested on this machine) does a
double-take (no collapse/collapse), whereas this does not happen in
Firefox, nor Opera.
The end result I am looking for is
to get the image to sit within the div, without it overlapping. This is
almost certainly a problem with clearing floats, but I can't seem to
find it.


!!! Failed validation, 14 errors !!!

Regarding the image overlapping the bottom border (actually background
image).

Solution#1: Move the IMG up.
Place the IMG before the H2 and thereby the IMG is moved up enough.
<div class="copy">
<img src="....">
<h2>Wing Commander Watch</h2>
<p>"Lorem ....

Solution#2: Clear the Link line.
Add to the stylesheet:
.clearimg {clear:right;}
Add the class attribute to the html:
<p class="clearimg"><a ... Continue Reading ...
This solution also works well with IE 5.5 (Quirks).

For #content-feature increase margin-top for _both_ Solutions above:
from: {margin: 1px 1px 0 0;}
to: {margin: 20px 1px 0 0}

--
Gus
Sep 5 '05 #5
Daz
I sorted the overlapping image out using the holly hack, and a block
display. I couldn't get the guillotine bug fixed for IE, so I've just
removed the border from the link in IE (I don't use IE so I'm not
fussed - it's not like anyone else will notice!)

Thanks anyway Gus!

Sep 5 '05 #6
Daz wrote:
I sorted the overlapping image out using the holly hack, and a block
display. I couldn't get the guillotine bug fixed for IE, so I've just
removed the border from the link in IE (I don't use IE so I'm not
fussed - it's not like anyone else will notice!)

Thanks anyway Gus!


For the resulting rendition that you have now, Solution#2, by only
applying the Clear, gets the same result without any hack. I have not,
nor do I intend to, check out your use of the hack, since no hack is
necessary.

Now I ask you, why would you prefer to use a hack instead of simply
applying the rules properly?

I can understand your pride in having found a solution, partial at that,
although questionable if it will hold as a template with different
content. On the other hand, by your original questions, you do not have
a clear understanding of floats and clears. My two solutions, if you
check out the methods and reason them out, should clear that up.
Instead, you seem to indicate that you have not tried my solutions, are
going with your applied hack and still don't clearly understand floats
and clears. Whatever rings your bell.

BTW, Solution#2 is my recommendation. Solution#1 is there only for
information, insight and understanding, since it may not be robust
enough as a template with different content.

--
Gus
Sep 5 '05 #7
Daz
I did indeed try your suggestion, which did indeed solve the problem of
the guillotine bug, but it forced the <p class="clearimg"><a ...
Continue Reading ... down below the image, which is not what i'm after.

Why do you assume I have gone with my solution because of pride? I
understand you may be upset that you have worked out a solution,
partial at that, although questionable if it will hold as a template
with different content, and then not have it used, but I have found a
workaround which suits my needs, and having already spent a fair amount
of time looking into the guillotine bug I cannot devote any more to
doing so when I have a perfectly adequate solution right now.

I'm not aiming for any coding awards here, and no, I don't expect to
get any either. Yes I know that to some people I'm committing heracy to
even suggest that a quick bodge it will do, but hey, this is the real
world and as long as it's not got any major problems then I'm OK with
that, the end user's aren't going to have a cluie that I wanted a boder
of the links, so it makes no difference if I hack it or not.

Why is it that the only people who have replied to my posts have been
rude, un-friendly, know-it-alls? For goodness sake get away from your
darkened rooms lit only by your monitor and learn some bloody
inter-personal skills, not to mention some netiqette. It doesn't take
much to be poilte and welcoming, all I did was ask for some help and
I'm shot down for taking a shortcut.

Sep 5 '05 #8
Daz wrote:
I did indeed try your suggestion, which did indeed solve the problem of
the guillotine bug, but it forced the <p class="clearimg"><a ...
Continue Reading ... down below the image, which is not what i'm after.
Solution#1 does not clear the link below the image. That was why I
presented it as well. I guess you didn't try that one.
Why do you assume I have gone with my solution because of pride?
Since I see no other reason for not applying the rules properly and
instead going with a hack?
I understand you may be upset that you have worked out a solution,
partial at that, although questionable if it will hold as a template
with different content, and then not have it used, but I have found a
workaround which suits my needs, and having already spent a fair amount
of time looking into the guillotine bug I cannot devote any more to
doing so when I have a perfectly adequate solution right now.
I don't care in the least what you end up using. I took your question in
good faith requesting to know how and why ("Help please!"). I showed you
how and tried to point out the why. The normal way is to use the tools
provided by the specs, that is to say; simply applying the rules
properly. If it is not possible, then one goes on to trying hacks. You,
on the other hand, from what I surmised and from what you say now,
choose to ignore the norm and choose a hack. It simply boggles my mind
and I expressed that you still did not understand the how and least of
all the why and to top it off, you seem to not care. It undercuts the
good faith part.
I'm not aiming for any coding awards here, and no, I don't expect to
get any either. Yes I know that to some people I'm committing heracy to
even suggest that a quick bodge it will do, but hey, this is the real
world and as long as it's not got any major problems then I'm OK with
that, the end user's aren't going to have a cluie that I wanted a boder
of the links, so it makes no difference if I hack it or not.
The biggest difference between people's work, no matter in what
endeavor, is that of pride in their work.
Why is it that the only people who have replied to my posts have been
rude, un-friendly, know-it-alls? For goodness sake get away from your
darkened rooms lit only by your monitor and learn some bloody
inter-personal skills, not to mention some netiqette. It doesn't take
much to be poilte and welcoming, all I did was ask for some help and
I'm shot down for taking a shortcut.


I understand what you say and why you say it, considering this newsgroup
where it is commonplace for the regulars to respond only with cryptic
responses and demeaning statements. I, on the other hand, certainly was
trying to be helpful and clear. You were not even listening and wasted
both of our times.

My solutions apply the rules properly with minor differences. The
difference in Solution#2 does not suit you, but Solution#1 should suit
you, yet you are going with an unnecessary, applied hack and still don't
clearly understand floats and clears, hence the "Whatever rings your
bell" (meaning: use what you want to use and are happy with, plus good
luck to you).

I'm beginning to understand (not condone) what has driven the regulars
to their cryptic and often rude responses.

--
Gus
Sep 6 '05 #9
Daz wrote:

learn... some netiqette.


You might want to take your own advice and learn the accepted posting
and quoting conventions of this group before you start complaining.

Failure to properly quote, or attribute quotes, is common among those
using that abominable google groups to post to usenet. Do yourself and
everyone else a favor and get yourself a proper newsreader.

I'm always amazed at the number of people posting throught GG, but don't
bother using it for the only thing it's really designed for--searching
newsgroup archives. It doesn't seem to occur to them that they might
even find their own answers. :-\

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Sep 6 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: duikboot | last post by:
Hi all, I'm trying to export a view tables from a Oracle database to a Mysql database. I create insert statements (they look alright), but it all goes wrong when I try to execute them in Mysql,...
4
by: kevin | last post by:
meta refresh tag is failing , it is supposed to go to the entry1.htm site which is the flash swf file but it doesn't check code please http://members.optusnet.com.au/~kevindauth/ thanks...
14
by: TrvlOrm | last post by:
OK. After much playing around, I managed to get my frame page this far.. see code below. BUT...there are still errors with it, and what I would like to have happened is this: 1) On the Left...
23
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application...
1
by: Chua Wen Ching | last post by:
Hi there, I have some problems when reading XML file. 1. First this, is what i did, cause i can't seem to read "sub elements or tags" values, so i place those values into attributes like this....
4
by: steroche | last post by:
I would REALLY appreciate help please please please! Im sure it is probably blindingly obvious to most of you but I am totally in the dark here!I am lost - i thought i had finally figured out this...
28
by: Tim_Mac | last post by:
hi, i'm new to .net 2.0, and am just starting to get to grips with the gridview. my page has autoEventWireUp set to true, which i gather is supposed to figure out which handlers to invoke when...
2
by: Richard | last post by:
Help please. I am trying to autofill a form text field from a select-box lookup. I have no problem doing this if the select-box is part of the form but because there are 5 possible select boxes...
0
by: uno7031 | last post by:
Help Please!!! Adding 5 Days to another Date in an access query Good Morning, Help please…. I am new to access and trying to write a query that will add 5 days between a RecDate and a...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.