|
Convenient web based access to our favorite web design Usenet groups
|
 |
This is Interesting: Free Magazines for Graphics designers and webmasters
| Author |
| Thread |
 |
|
|
|
|
|
 |
 |
|
|
 |
|
|
 |
|
|
 |
 |
Re: is it another IE bug? text do not float around fist floated |
 |
|
 |
|
|
|
  07-31-07 - 11:17 PM
|
于 Tue, 31 Jul 2007 16:34:53 +0800,Zhang Weiwu写到:
> Dear all.
[snip]
> cannot change the sequence these divs gets output, so I have to
> find out a solution to make Internet exploer layout 3 <div>s the
> way it is on Firefox, that is, like this (see it in fixed width font)
>
> +----------------+----------+
> | <div id="1st"> | <div |
> +---------+------+ id="3rd" |
> | <div id="2nd"> | ...> |
> +----------------+----------+
I have managed to have done that after a lot of trials and discussion with
my colleague. Here is the solution (to use the solution I created a <div>
enclose all the other <div>s, and name it "container"):
div#container {
position: relative;
width: 100%;
}
div#the_1st, div#the_2nd {
width: 63%;
float: left;
}
div#the_3rd {
width: 34%
left: 63%;
top: 0%;
}
this is very complex, compare to the "standard CSS" solution, which would
layout correctly with only one line of CSS:
div#the_1st, div#the_2nd { width: 63%; float: left; }
But, my complex solution works for IE! This is the most important thing
for my customer! In those days where everybody use IE, who cares if
standard CSS looks neater anyway.
I hope I can get some suggestions on what exactly is this IE bug and had
it been filed somewhere? Thanks in advance!
Best Regards.
|
|
|
| [
Post Follow-Up to this message ]
|
|
|
|
|
 |
 |
Re: is it another IE bug? text do not float around fist floated |
 |
|
 |
|
|
|
  07-31-07 - 11:17 PM
|
Zhang Weiwu wrote:
>
> Here is the solution (to use the solution I created a <div>
> enclose all the other <div>s, and name it "container"):
>
> div#container {
> position: relative;
> width: 100%;
> }
>
> div#the_1st, div#the_2nd {
> width: 63%;
> float: left;
> }
>
> div#the_3rd {
> width: 34%
> left: 63%;
> top: 0%;
> }
>
> this is very complex,
?
Adding a single container isn't "complex". Maybe you really meant
something else, but I'm not sure what that might be.
BTW, the left and top properties in the_3rd selector won't do anything.
They only apply to positioned elements (relative, absolute, fixed) and
have no effect on static (the default) elements or floats. Suggested
reading:
http://brainjar.com/css/positioning/
Pay special attention to the part about clearing floats, too, then see
http://www.quirksmode.org/css/clearing.html
> But, my complex solution works for IE!
Assuming that it does "work" (which I cannot confirm or deny), you not
knowing what is really happening will only make it that much harder to
maintain in the future. Instead of hacking away at something without
understanding it, take the time to learn what that CSS is *supposed* to
do. It will make everything so much easier in the long run.
> In those days where everybody use IE,
Um, no, they don't. You might search for some recent statistics on the
European market. The number of IE users isn't nearly as high as you think.
--
Berg
|
|
|
| [
Post Follow-Up to this message ]
|
|
|
|
|
 |
|
|
 |
| All times are GMT. The time now is 03:59 AM. |
 |
|
|
|
|
|  |
|