homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

Internet Explorer body Element
Steve Newcastle

Msg#: 4133740 posted 11:32 pm on May 16, 2010 (gmt 0)

I have a page which validates but the body border doesnt contain all the elements without enforcing IE7 compatability with the META tag. I have worked around it but I cannot see what is wrong with the original. The border only extends to the opening elements which are not in the divs. Is this a bug or a mistake on my part?

[edited by: tedster at 12:46 am (utc) on May 17, 2010]
[edit reason] no personal links [/edit]



WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 4133740 posted 1:01 am on May 17, 2010 (gmt 0)

Hello Steve, and welcome to the forums.

Does the page display as you intend in other browsers - Safari, Firefox, Opera, Chrome? As a general rule, those rendering engines are much more standards-compliant. Cross-browser development works best if you start with one of those browsers, and then tweak for any IE problems that show up.

If the only problem you see is in IE, then try reducing your source code to the bare essentials needed to show the problem (without giving any hints to the actual website involved) and we'll take a look at that test case.

Steve Newcastle

Msg#: 4133740 posted 11:00 am on May 18, 2010 (gmt 0)

It seems that in IE8 and Firefox there is problem when you apply a border to the body element if you have floating elements within it. The workaround is to enclose everything in a further div and apply the border to that. It is strange that IE7 does not seem to have this problem.
Here is the coded

<meta http-equiv="Content-Language" content="en-gb">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Problem With Border</title>
<style type="text/css">
body {border:2px solid green;padding:5px}
div {float:left;width:40%;height:40px;border:1px solid black;margin:10px}

<p>The border ought to be around the whole page not just this</p>

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved