You are here: Re: Problems with margins, paddings, divs and floats! PLEASE HELP! « HTML « IT news, forums, messages
Re: Problems with margins, paddings, divs and floats! PLEASE HELP!

Posted by Agix on 05/09/07 22:39

On 9 May, 19:47, Ben C <spams...@spam.eggs> wrote:
> On 2007-05-09, Agix <ignoranceisbl...@gmail.com> wrote:
>
>
>
> > HI there,
>
> > I am fairly new to web coding, not so new I don't know what tags are
> > or anything that basic, but new enough to be frustrated by obstacles
> > that trying to use multiple browsers is causing and not knowing the
> > way round it.
>
> > Here I must stress I AM NOT LOOKING for workarounds or fixes or hacks
> > per s?, but more for an explanation of why I see this behaviour - my
> > experienced friend coder doesn't seem to understand my plight.
>
> > I have even include a link to the offending page
> >http://www.clarifysolutions.co.uk/certenroll/
> [...]
> > If you take a look at particularly "#mainpageset" this is a div tag
> > container for the entire page contents. It has it's width set to
> > 560px.
>
> > Notice how I have set EVERY id and class to have margin AND padding =
> > 0px. This is so I can work out how the browser is behaving.
>
> > Secondly, take note of "#mainpagecont" and "#adbarright" - 400px and
> > 160px respectively in width.
>
> > If you take a look at the link in Firefox - it renders ok, but messes
> > up a fair bit.
>
> What's wrong with it?
>
> > In IE6+7 it looks plain awful. What I am really annoyed about is that
> > the two divs, no margins or paddings but they still overlap!!!!
> > Correct me if i'm wrong but - 400px + 160 px = 560px , no?!?!?! Why
> > does the browser not follow mathematics?
>
> Firefox is following mathematics OK here.
>
> 400px + 160px + 2px + 2px = 564px.
>
> Each 2px is for the left and right borders of mainpagecont and
> adbarright.

Thank you thank you thank you thank you.

I was just being ignorant about the browsers including the borders in
their calculations. Explains the dodgy look in IE as well.

I will bear that in mind for future designs.

Although do the browsers include a border calculation if there is not
one? or do they just sit flush together?

many thanks again

Gregory

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация