• Hi all,
    Using Firefox the page that opens up after hitting “Post a comment” on my blog has no margins at all (in the main text area).
    Internet Explorer puts the content nicely in the centre with margins on both sides (as it should of course).
    What sort of a problem have I run up against here, do you think?
    This is the blog: http://www.elearningdesigners.nl/blog
    I’d really appreciate your expert advice.
    Arnold

Viewing 6 replies - 1 through 6 (of 6 total)
  • I see some issues here, but for a quick fix, perhaps try changing

    .widecolumn .post {
    margin: 0;
    }

    to:
    .widecolumn .post {
    margin: 0 25px;
    }

    for the ‘post’ margins… For the comment box, change:
    #commentform input {
    width: 170px;
    padding: 2px;
    margin: 5px 5px 1px 0;
    }
    #commentform textarea {
    width: 100%;
    padding: 2px;
    }
    #commentform #submit {
    margin: 0;
    float: right;
    }

    to:

    #commentform input {
    width: 170px;
    padding: 2px;
    margin: 5px 5px 1px 5px;
    }
    #commentform textarea {
    width: 97%;
    margin: 5px 5px 1px 5px;
    padding: 2px;
    }
    #commentform #submit {
    margin: 0 20px;
    float: right;
    }

    Hope it helps.

    Thread Starter muhren

    (@muhren)

    Hi Yosemite,

    Thank you for the suggestions.
    The problem is that adding margins in the style sheet to get a better result for Firefox gives an accumulated result in Internet (with wider margins than I think are appropriate).

    There must be something I am missing – is that perhaps also what you’re hinting at when you say that you “see some issues here”? What are they if I may ask?

    Arnold

    I’m just a novice at css but when I look at the css for your page I notice it’s littered with settings that are remarked out (e.g.; /* 1.5em; */) which is a hack for IE. I prefer to start with valid css and only hack for IE when necessary and I’ve never needed that many hacks…

    How about this, try validating at http://validator.w3.org/ (couple minor errors).

    My first trip would be to http://www.cdburnerxp.se/cssparse/css_optimiser.php and I would try taking the result and replace the current css file, test and then do IE hacks if necessary.

    Keep in mind that all IE hacks will likely ‘break’ in IE 7 anyway, so now may be the time ;’)

    Hope this helps.

    Thread Starter muhren

    (@muhren)

    Hi Yosemite,

    I checked out the sites you suggested. They’re great, thanks a million. I solved the problem in a way that did not disclose to me the cause of the problem. Well, you can’t win them all.

    This is what I did:
    I printed out the style.css file of the original Letterhead theme and my own adapted style.css file. I wanted to compare them.
    Then I installed the original theme and step-by-step built up again my own adaption using teh style sheets for this.
    Lo and behold! The aberration did not repeat itself. Pity I did not discover what caused the problem in my earlier work.
    Thanks very much, Yosemite, for all the time you spent on helping me out.

    Kindest regards, Arnold

    For future reference, you should always code styles for standards-compantible browsers (like Firefox) before any other browser. IE is a broken browser and likes to “guess” at what you want it to do, even when you’ve coded improperly. Many times, it guesses correctly, but a lot of times, it does not and throws things off.

    If you create your styles for standards-compatible browsers, then the site eill lay out fine in pretty much ALL browsers, except IE. Then it’s just a matter of adding a secondary stylesheet (with only a few lines of “fix it” code) in a conditional comment.

    In regards to this post, IE likes to add mysterious margins and paddings to block-level elements – which is probab;y why you were seeing it nicely in IE, but Firefox was reading the stylesheet correctly – as most browsers will.

    Fixing for IE is not a good ideas, unless you really want to specifically alienate people from using a good browser when they come to visit your site.

    Thread Starter muhren

    (@muhren)

    Thanks, doodlebee.
    This is useful information also. I am starting to like this community!
    Your own blog is so elegant. Looks really good! Will soon read it as well. Have to finish other things first now.
    Cheers, Arnold

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Problem with margins’ is closed to new replies.