There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Fixing Margins/Padding in IE


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
Mix0mat0sis's Avatar
Computer Specs
Member with 48 posts.
 
Join Date: Nov 2006
Experience: Advanced
27-Feb-2007, 01:36 AM #1
Question Fixing Margins/Padding in IE
Hey All,

www.clubs.psu.edu/navs

There seems to be a recurring issue in my website that I'm desigining. If you look at my site in Firefox, everything looks great. However, Internet Explorer seems to be adding either margins or padding in places where i really don't want it (my site is shifted to the right in ie6 and the two rounded boxes have a large gap between the header and content). Is there a hack i need to use to fix this or is it something really simple?

Criticism on my overall website is definitely welcome...it's one of my first css/table-less sites. I do think i "over-divved" it though. And it's not done yet, either. :-(

Here's my relevant code for my problem:

body {
font-size: small;
padding:0;
margin:10px 60px;
background: #006699 url(gutter.jpg) repeat-y bottom left;
}

* html body {
font-size: small; /*for IE5/Win */
f\ont-size: small; /*for other IE versions */
margin:10px 100px;
}

#container {
margin:0px;
background-color:#FFFFFF;
width:800px;


and this:

.box {
color: #666;
background:#fff;
padding:0;
margin:0;
}
div#getinvolved p{
padding:0 8px;
}


div#getinvolved h3 {
background: url(img/h3-bg2.gif) no-repeat top left;
color:#fff;
margin:0;
padding: 6px 8px 4px 15px;
}

Thanks!
Gibbs's Avatar
Senior Member with 638 posts.
 
Join Date: Feb 2005
Location: England
Experience: Intermediate
27-Feb-2007, 08:52 AM #2
What's this?

HTML Code:
f\ont-size: small; /*for other IE versions */
namenotfound's Avatar
Computer Specs
Distinguished Member with 2,109 posts.
 
Join Date: Apr 2005
Location: New York
Experience: I know what I know, I am
27-Feb-2007, 09:23 AM #3
As far as I know f\ont-size isn't valid CSS.
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,208 posts.
 
Join Date: Oct 2006
27-Feb-2007, 11:12 AM #4
I've seen some sites do that but can't figure out why.

Maybe its only so certain browser versions read it.
Mix0mat0sis's Avatar
Computer Specs
Member with 48 posts.
 
Join Date: Nov 2006
Experience: Advanced
27-Feb-2007, 12:56 PM #5
yeah, it appears f\ont-size isn't valid css. I can use ie conditionals to probably solve that problem but i don't think it will solve my main problem. Does you have any other suggestions as to why my page is shifted in ie6?
Gibbs's Avatar
Senior Member with 638 posts.
 
Join Date: Feb 2005
Location: England
Experience: Intermediate
27-Feb-2007, 01:19 PM #6
I'm guessing f\ont-size was a typo . Did you actually try to validate it lol?
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,208 posts.
 
Join Date: Oct 2006
27-Feb-2007, 01:26 PM #7
Quote:
Originally Posted by Gibbs
I'm guessing f\ont-size was a typo . Did you actually try to validate it lol?
Actually I know another site that has that and also has valid css.
DrP's Avatar
DrP DrP is offline
Senior Member with 481 posts.
 
Join Date: Jul 2005
Location: UK
Experience: What's a compoota?
27-Feb-2007, 04:57 PM #8
If you want the site centered then give the page text-align: center; and the container margin: 0px auto;
Are you using floats? If so, google for Internet Explorer Double Margin Bug.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 02:19 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.