By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,648 Members | 1,198 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,648 IT Pros & Developers. It's quick & easy.

div border differences in IE and firefox

P: 3
In my website I'm using divs with a border around them. The big problem is that IE puts the borders "inside" of the size given, and Firefox puts the border "outside". How can I solve this problem?
Mar 14 '07 #1
Share this Question
Share on Google+
5 Replies


drhowarddrfine
Expert 5K+
P: 7,435
It sounds like you are having "box model" problems. IE uses the wrong box model for web pages in many instances. To fix it, you need a proper doctype, which I assume you aren't. See the sticky at the top of this board about doctypes.
Mar 14 '07 #2

Expert 100+
P: 1,892
In my website I'm using divs with a border around them. The big problem is that IE puts the borders "inside" of the size given, and Firefox puts the border "outside". How can I solve this problem?
Post your code so we can see the difference with the two browsers.


Aric
Mar 14 '07 #3

P: 3
It sounds like you are having "box model" problems. IE uses the wrong box model for web pages in many instances. To fix it, you need a proper doctype, which I assume you aren't. See the sticky at the top of this board about doctypes.
I read the sticky and put the right doctype in my code, which didn't help.

I put this in my stylesheet:
Expand|Select|Wrap|Line Numbers
  1. div.back
  2. {
  3. background-color: #FFFFFF;
  4. border: 5px solid #CC00FF;
  5. position:absolute; 
  6. left: 200px; 
  7. top: 125px; 
  8. width: 600px; 
  9. height: 350px;
  10. }
  11.  
I'm pretty new to this kind of thing, what else do you need?
Mar 14 '07 #4

P: 3
hmm, it muist have been the doctype thingie after all... but it's solved now, yay :D
Mar 14 '07 #5

Expert 100+
P: 1,892
hmm, it muist have been the doctype thingie after all... but it's solved now, yay :D
The Doctype is extremely important! Glad you got things figured out let us know if you have anymore troubles.

Aric
Mar 14 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.