Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-03-2012, 11:57 AM   PM User | #1
himalaya
New to the CF scene

 
Join Date: Feb 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
himalaya is an unknown quantity at this point
CSS Box Model

<html>
<head>
<style type="text/css">
div.ex
{
width:220px;
padding:10px;
border:5px solid gray;
margin:0px;
}
</style>
</head>

<body>
<img src="250px.gif" width="250" height="1" /><br /><br />

<div class="ex">The line above is 250px wide.<br />
The total width of this element is also 250px.</div>

<p><b>Important:</b> This example will not display correctly in IE8 and earlier
versions!<br />
However, we will solve that problem in the next example.</p>

</body>
</html>
himalaya is offline   Reply With Quote
Old 02-03-2012, 08:06 PM   PM User | #2
fredrikrob
New Coder

 
Join Date: Sep 2011
Location: NY
Posts: 33
Thanks: 4
Thanked 0 Times in 0 Posts
fredrikrob is an unknown quantity at this point
What is the Css Box in this ? Are you looking for any solution or it's kind of discussion post ?
I cant get you what you are looking for .
__________________
Do you like to change PSD to HTML or PSD to drupal conversion here is the Answer.
fredrikrob is offline   Reply With Quote
Old 02-03-2012, 08:47 PM   PM User | #3
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,465
Thanks: 0
Thanked 499 Times in 491 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Quote:
Originally Posted by himalaya View Post
This example will not display correctly in IE8 and earlier
versions!
It will if you include a doctype tag as the very first thing in the page. Then the box model will work correctly all the way back to IE6.

It is only in IE5 which introduced those CSS commands while they were still in draft and then had the meaning change d in the final standard where it is not possible to get the box model to work correctly. As that browser is long dead the IE5 version of the box model is only of historical interest to any site written since IE6 was first released.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Reply

Bookmarks

Tags
box model

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:09 PM.


Advertisement
Log in to turn off these ads.