473,396 Members | 1,693 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,396 software developers and data experts.

strange behavior with IE and margin...

this is really strange... I cant find what is wrong...

so, #botonera have a left margin of 18px, but IE make it 36px!
If I put a margin of 30px, IE make it 60px!
I am crazy?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>hello world</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<style type="text/css" media="screen, tv, projection">
body, html {
margin: 15px 0px 0px 0px;
padding: 0px;
background: #fff;
color: #000;
}

body {
min-width: 764px;
}

#contenedora {
background: #fff;
margin: 0 auto;
width: 764px;
height: 419px;
}

#principal {
position: relative;
background: #514c38;
float: left;
width: 382px;
height: 419px;
font: .7em Verdana, Geneva, Arial, Helvetica, sans-serif;
color: #eeeeee;
}

#contenido {
float: right;
width: 290px;
text-align: right;
padding: 0 10px 0 0;
}

#contenido h2, #contenido h3 {
padding: 0;
margin: 0;
color: #35ad9b;
font-weight: bold;
font-size: 1.1em;
}

#botonera {
float: left;
padding: 0;
margin: 0 0 0 18px;
width: 60px;
height: 34px;
border: 1px dashed #eee;
background: #eeffee;
}

#navegacion {
position: absolute;
bottom: 0;
right: 0;
padding: 0;
margin: 0 15px 15px 0;
text-align: right;
}

#navegacion ul{
margin:0;
padding:0;
list-style:none;
}

#navegacion li{
display:inline;
margin:0;
padding:0;
}

#imagen {
float: right;
width: 382px;
height: 419px;
background: #fff;
}

</style>

</head>
<body>
<div id="contenedora">

<div id="principal">
<img src="cabecera_con_d.gif" alt="" width="382" height="85" />

<div id="contenido">
<h2>Mi mamá me mima</h2>
Vamos con la descripci&oacute;n! <em>Italica</em>... <strong>negriita</strong>....<br /><br />

Fotograf&iacute;a de mate para tomar mate mammamamammama.
</div>
<div id="botonera">
<img src="enlaceportfoliooff.gif" alt="" width="60" height="17" /><br />
<img src="enlacecontactooff.gif" alt="" width="60" height="17" />
</div>
<div id="navegacion">asdsa</div>
</div>
<div id="imagen"><img src='lindafoto.jpg' alt='' align='top'/></div>

</div>

</body>
</html>

--
Luciano A. Ferrer
la**************@SacaDMEgmail.com
http://relojurbano.com.ar .algún día volverás.

.... Vencía el que se despojaba de todo.
Jun 12 '06 #1
3 2078
"Luciano A. Ferrer" <al************@arnet.com.ar> wrote:
so, #botonera have a left margin of 18px, but IE make it 36px!
If I put a margin of 30px, IE make it 60px!
I am crazy?
No, it's IE that's is crazy.
#botonera {
float: left;
margin: 0 0 0 18px;
}


If you have a style with float: left and margin-left: XX then IE will
make margin-left twice the size it should be (and the same with float:
right and margin-right)

See http://www.positioniseverything.net/...ed-margin.html
for more details and some suggested fixes.

Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jun 12 '06 #2
Steve Pugh ha escrito lo siguiente el 12/06/2006 04:10:
#botonera {
float: left;
margin: 0 0 0 18px;
}


If you have a style with float: left and margin-left: XX then IE will
make margin-left twice the size it should be (and the same with float:
right and margin-right)

See http://www.positioniseverything.net/...ed-margin.html
for more details and some suggested fixes.


wow, thanks a lot Steve
It was the first time it happened to me, what an odd behavior... :)

--
Luciano A. Ferrer
la**************@SacaDMEgmail.com
http://relojurbano.com.ar .algún día volverás.

.... Vencía el que se despojaba de todo.
Jun 12 '06 #3
Luciano A. Ferrer wrote:
Steve Pugh ha escrito lo siguiente el 12/06/2006 04:10:
#botonera {
float: left;
margin: 0 0 0 18px;
}


If you have a style with float: left and margin-left: XX then IE will
make margin-left twice the size it should be (and the same with float:
right and margin-right)

See http://www.positioniseverything.net/...ed-margin.html
for more details and some suggested fixes.


wow, thanks a lot Steve
It was the first time it happened to me, what an odd behavior... :)


I have seen comments like that made quite often in regard to IE :)

--
"The most convoluted explanation that fits all the available and made-up
facts is the most likely to be believed by conspiracy theorists"
Jun 12 '06 #4

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

Similar topics

1
by: Hartmut J?ger | last post by:
I produce a list of tables with PHP, which outputs a lot of tables with the following HTML-Code: <table border="1" width="96%" cellspacing="0" cellpadding="0" align="center"...
9
by: Robert Misiorowski | last post by:
Hello, I have a very perplexing (at least to me) problem that hopefully someone can help me with. I'm making a site with a 3 column layout. In the middle column (my fluid column) I am trying to...
0
by: Luigi | last post by:
I would know what "criteria" is used in box positioning with the position property. Here my tries (using IE and Opera): I have a box with an absolute positioning (properties used: position,...
1
by: Luigi | last post by:
I noted a particular behavior shown by IE. Look at the simple page attached at the bottom of the post. In it, there is a box floated with the float property and another box that jumps it with the...
16
by: brian.ackermann | last post by:
Hi all, I'm working on a quick-n-dirty forum to plug into a 'strategic task planning' module I am putting together. The basics are all in place. I've gotten to a point where I can now view the...
1
by: shapper | last post by:
Hello, I have a page and two user controls: Page.aspx |--- UserControl_1.ascx |--- UserControl_2.ascx
0
by: atarumorooka | last post by:
Hello, yes..it must be hard to try and help someone else coding but today is a full week of sadness and stress for IE CSS rendering and I need your help. Here you have a link that looks nice with...
10
by: silverbob | last post by:
I am replacing my Javascript-called files with SSI, and I'm getting an unexpected result with my page footer. I can really use some help with this. The footer contains a copyright (left...
0
by: charmeda103 | last post by:
when i run my program it runs with no erorrs but the output screen is giving me strange results here is whats its giving me: CONFERENCE OVERALL RANK TEAM W-L % WINS MARGIN W-L ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.