Hey all,
Recently I’ve come across a slight issue where my margins are off in different browsers. In Firefox (where it was coded, the css), there are no issues, however in other browsers such as Safari or Chrome, the margin is off by anything from 1-3px, but nothing too bad. And lastly, IE, well…that’s a whole different story…the margin is off by a code 100px, at least.
Now, I’m somewhat new in this domain of coding sites, so my method of setuping up divs, etc may be incorrect to begin with. Anyway, here is my problem;
Basically, I setup the body portion of my site in 2 sections, the left side (div id=“leftside”) and the right side (div id=“rightside”). I then proceeded to code the left and right margins…there were no real issues with that. The problems started when I needed to get the right side up beside the left side, so I used float and margin-top values.
Basically, what I did in order to get the right side up beside the leftside is this;
#rightside {
float: right;
margin-top: -1435px;
}
I don’t know if that is the correct way to do it, but it was the only way I was able to get the right side lined up right beside the left side. If I remove the negative margin-top value, the right side is to the right, but below the left side.
My code works fine in Firefox, as stated, but when I open it in virtually any other browser, the margin-top is off by anything ranging from 1px to 100px+
Is my error in the way I set it up? Or is there a way to get around the margin issues?
Thanks a ton,
Elementax