4 replies [Last post]
Inflicted
Inflicted's picture
Offline
newbie
Haarlem, Netherlands
Last seen: 15 years 46 weeks ago
Haarlem, Netherlands
Joined: 2004-09-17
Posts: 6
Points: 0

First post!

My style sheet is based on a two column example I found on the web.
What happens is, the margin I've set is behaving differently on
different browsers. Here's the example: example

What is causing this?
Bear with me, I'm a noob...

btw I'm working on a Mac

wolfcry911
wolfcry911's picture
Offline
Guru
MA, USA
Last seen: 8 years 39 weeks ago
MA, USA
Timezone: GMT-5
Joined: 2004-09-01
Posts: 3224
Points: 237

margins behave bad in browsers!

Can you post your CSS and HTML for us?

Inflicted
Inflicted's picture
Offline
newbie
Haarlem, Netherlands
Last seen: 15 years 46 weeks ago
Haarlem, Netherlands
Joined: 2004-09-17
Posts: 6
Points: 0

margins behave bad in browsers!

Thanks wolfcry911,

Here's the CSS: CSS

The files is actually php, and I have the php tag in a div.
Could this be the problem? Here's the file: CSS-php test

thanks,

Root
Offline
Enthusiast
Brighton UK
Last seen: 15 years 42 weeks ago
Brighton UK
Joined: 2004-09-08
Posts: 76
Points: 0

margins behave bad in browsers!

I have a personal set of simple *rules* to help me with this kind of stuff. One of them is that whenever the width of anything is defined I never add paddding margins or borders. It does require a degree of lateral thinking to get started but then it is pretty simple. This rule of mine avoids all the complications which follow from the fact that the major browsers implement the box model; which is the very core of CSS-P; in polar opposite ways. That is what is causing the problem in your case. Hence the inconsistency. HTH.

No class, little style and a lotta division.

Inflicted
Inflicted's picture
Offline
newbie
Haarlem, Netherlands
Last seen: 15 years 46 weeks ago
Haarlem, Netherlands
Joined: 2004-09-17
Posts: 6
Points: 0

margins behave bad in browsers!

I found out the CSS is just fine, but it's the php tag
I placed in the content box that causes the problem.

How can I place a php tag in a document with CSS?

thanks

EDIT: Found the solution:ALA!
Great website!