[CSS]Padding problems

Experienced Elementalist
Joined
Jun 3, 2008
Messages
243
Reaction score
0
Hi, I am using padding (padding-left, padding-right:3px;) and on IE It's pefect but in Firefox and Google Chrome the div repeats its self going out to the left or into the right. Anyone know how to solve my problem?

CSS code:

}
#content_mid_main {
background: url(images/mid_main.png);
width:496px;
padding-left:5px;
font-family: sans-serif;
font-size: 12px;
background-repeat: repeat-y;
}

Picture:

Caribbean-Plus - [CSS]Padding problems - RaGEZONE Forums
 
You really should post more information before we can help you.

Also, if it looks good in IE and not on FF, then you're doing something terribly wrong.

Ok then..

CSS code:

}
#content_mid_main {
background: url(images/mid_main.png);
width:496px;
padding-left:5px;
font-family: sans-serif;
font-size: 12px;
background-repeat: repeat-y;
}

Picture:

Caribbean-Plus - [CSS]Padding problems - RaGEZONE Forums
 
What is the HTML code? What are the classes / elements around the problem class / element?
 
I went to your site and couldn't even find that frame :/

your css doesn't look messed up, it's probably the frame/div it's being applied to.. post the code for that, like pieman and Daevius already said.. -.-

The site you went to doesn't use the one I'm having problems with. I did fix it by taking the ammount of padding off the width like say if the width was 198px and I put 3px padding on I would make the width 195px, but then I had to use a different style sheet for IE, but other sites don't do that so there is a way to prevent it, I have looked at other sites codes but I can't find what there using to stop that from happening. The DIV/HTML code is simply:

<div id="mid_main"></div>

I haven't even added any content to it.
 
Well if I didn't do that bit right then I wouldn't even see the image? Yeah sorry I missed the content_ in the other post, it is content_mid_main in the original code. But it didn't solve anything :P
 
Try taking out the left padding and see how it reacts to firefox & IE both.

I used to fiddle with things like that when I first started.. Surprised on how such a small line of code can make all the difference. Especially if that line is being over-looked ;)
 
Back