Topic: My div doesn't respect the WIDTH css propertie in ie6! Pages that link to <a href="https://ozoneasylum.com/backlink?for=10775" title="Pages that link to Topic: My div doesn&amp;#039;t respect the WIDTH css propertie in ie6!" rel="nofollow" >Topic: My div doesn&#039;t respect the WIDTH css propertie in ie6!\

 
Author Thread
OMERA
Bipolar (III) Inmate

From: France
Insane since: Mar 2000

IP logged posted posted 07-19-2002 11:41 Edit Quote

Hi folks.
<edit>
I wasn't meaning width in my topic subject, but rather height!
</edit>

I was just wondering if this was an error of mine or just a bug of ie6.

I have that style defined

code:
#window{
margin:5px;
background-color: #aab;
border:0;
padding:0;

width:300px;
height:300px;
}

#topborder{
margin:0px;
padding:0;
width:100%;
height:1px;
background-color: #006;
cursor :pointer;
}



and that HTML

code:
<div id="window">
<div id="topborder"></div>
</div>



Problem is that, in ie6, the "topborder" div's width is ok, but the height remains always at a minimal size (obviously a text line height size), even if I specify its height lower!

Is this an IE6 bug or what?

Thanks!

OMERA ~ romantic dreamer ~

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

IP logged posted posted 07-19-2002 13:16 Edit Quote

I can't answer your question, but I have to ask (as I'm slightly confused), why do you need this setup? Why not just specify a top border for the 'window' div?

Or, specify a top border for the 'border' div and no background-color, if it's existence is actually necessary.

someoneInverse
Bipolar (III) Inmate

From:
Insane since: May 2002

IP logged posted posted 07-22-2002 08:17 Edit Quote

I guess that ie simply decides that the content of the topborder div must be text if the content is blank - hence you get the height set to a text line

try this instead:

<div id="window">
<div id="topborder"><img src="blank.gif" height="1" width="1" /></div>
</div>


hth
I:.

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

IP logged posted posted 07-22-2002 18:21 Edit Quote

You could also try this -

font-size:0;
line-height:0;

in the 'top-border' div style definition.

I still have to ask though.....why?



someoneInverse
Bipolar (III) Inmate

From:
Insane since: May 2002

IP logged posted posted 07-22-2002 19:05 Edit Quote

a slightly more elegant solution there

but yes - why?

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

IP logged posted posted 07-22-2002 19:14 Edit Quote

And another question,

why?

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

IP logged posted posted 07-23-2002 01:56 Edit Quote

Pourquoi?

___________________
Emps

FAQs: Emperor

OMERA
Bipolar (III) Inmate

From: France
Insane since: Mar 2000

IP logged posted posted 07-24-2002 13:03 Edit Quote

What a fascination people suddendly have for that question: "why"?

Etranges détours que parfois ces tortueux esprits taquins empruntent...

Well, just suppose I want to make a rectangular shape
-----

someoneInverse
Bipolar (III) Inmate

From:
Insane since: May 2002

IP logged posted posted 07-24-2002 13:42 Edit Quote

ah - that'd do it then


DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

IP logged posted posted 07-24-2002 19:02 Edit Quote

ok....tiny is one thing, but 1px??



someoneInverse
Bipolar (III) Inmate

From:
Insane since: May 2002

IP logged posted posted 07-25-2002 07:48 Edit Quote

minimalism's the new black

OMERA
Bipolar (III) Inmate

From: France
Insane since: Mar 2000

IP logged posted posted 07-25-2002 10:03 Edit Quote

Ha...
1px was just for the exemple... I if had used my real value (8px) one should have said "hey ho, are u sure that your line height isn't 8px height? Maybe the glasses of your are dirty blabalbalbalab" so i took an extreme vamue to fix the idea!

Got it?

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

IP logged posted posted 07-25-2002 13:07 Edit Quote

Ok, that makes a little more sense

Have you tried the line-height/font-size bit yet?

Curious to know if that works.

OMERA
Bipolar (III) Inmate

From: France
Insane since: Mar 2000

IP logged posted posted 07-25-2002 16:08 Edit Quote

Aah! Well, forgive me, I'm a little bit absent minded sometimes...
I tried your suggestion and It works fine!

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

IP logged posted posted 07-29-2002 14:01 Edit Quote
quote:
minimalism's the new black



hehehe, how very artsy


Code - CGI - links - DHTML - Javascript - Perl - programming - Magic - http://www.twistedport.com
ICQ: 67751342

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

IP logged posted posted 07-29-2002 18:04 Edit Quote

ok, cool.




Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu