467,212 Members | 1,097 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,212 developers. It's quick & easy.

div border differences in IE and firefox

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
  • viewed: 6102
Share:
5 Replies
drhowarddrfine
Expert 4TB
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 1GB
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
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
hmm, it muist have been the doctype thingie after all... but it's solved now, yay :D
Mar 14 '07 #5
Expert 1GB
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.

Similar topics

reply views Thread by Red | last post: by
4 posts views Thread by Andreas Knig | last post: by
reply views Thread by smokeyd | last post: by
8 posts views Thread by Warren Sarle | last post: by
reply views Thread by hari24patil@gmail.com | last post: by
1 post views Thread by biegel@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.