473,626 Members | 3,276 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1598
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">Contin ue
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
3486
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, because the dates must have quotes on each side. I just don't know how make the dates right. Well I'll just show you the code and some insert statements it generates. Could anyone please help me?
4
1988
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 kevin
14
2140
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 Frame (File LeftEx8_2.html) a series of buttons, which when clicked prompt the user to enter information for background color, text color, link color, title and some text.
23
3259
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 to create certain textboxes, labels, and combo boxes? Any ideas would be appreciated. Thanks
1
3435
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. Before: ----------
4
2264
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 dataSet updating lark when i realised that i think i am right back at square 1!!! Here's my scenario - i have a SQLDB and i retrieve all my data from that into a dataset and display this to a datagrid(WebForm). I have got this grid sorted and...
28
10256
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 appropriate based on your method names . the GridView has OnRowCommand="GridView1_RowCommand" in the aspx. my problem is that the RowCommand event is firing twice (95% of the time) on the page. the other 5% it only fires once. there's no
2
2585
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 for them to choose from and because of the very large number of options in each select box, to save form loading time, I want to put the look-up select boxes on separate (pop-up) pages. (I prefer them not to be hidden divs on the same page) ...
0
2734
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 DLPayDate I created the query in design view of access. Current Query: SELECT PaymentCalculator2.ID, PaymentCalculator2.RecDate, DateAdd("w",5+1,) AS DLPayDate, DateAdd("w",5,) AS DLPayDate2 FROM PaymentCalculator2 WHERE...
0
8203
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8711
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8642
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7203
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5576
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2630
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1515
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.