2 replies [Last post]
gwouite
Offline
newbie
Paris, France
Last seen: 13 years 8 weeks ago
Paris, France
Joined: 2008-06-04
Posts: 2
Points: 0

Hello,

I have a problem that I usualy resolved with a table ! But now i'm having time and i'm bored of resolving it like that !

Watch My Code :




* {
padding: 0px;
margin: 0px;
}

#div_1 {
background-color: #ffff00;

width: 100px;
height: 100px;

float: left;
}

#div_2 {

margin-left: 100px;

background-color: #ff00ff;

width: 100px;
height: 100px;
}






Div 1 !


Div 2 !

As you can see on your browser, there is a small gap between "div_1" and "div_2" BUT WWHHYYYYYY ?

Thanks for any help that you could give me !
Guillaume.

Caposoft
Caposoft's picture
Offline
Enthusiast
Last seen: 6 years 25 weeks ago
Timezone: GMT+1
Joined: 2008-03-16
Posts: 330
Points: 118

Hi Guillaume, in the future

Hi Guillaume,

in the future specify the browser in that you see the problem, since not everyone is using an outdated browser as you do. The problem appears in IE6, don't know why, I will leave that to those more experienced. You can solve it by scratching the margin-left on the #div_2 and make it a float:left

gwouite
Offline
newbie
Paris, France
Last seen: 13 years 8 weeks ago
Paris, France
Joined: 2008-06-04
Posts: 2
Points: 0

Thank you

OK, Thank you very much !

I will try this later then tell you back if it's ok for what I want to do Wink

Sorry for the version problem !

Guillaume.

Stupid IE !