By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,823 Members | 730 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,823 IT Pros & Developers. It's quick & easy.

Border problems

P: n/a
Hi.

I have a couple of problems with borders, where the appearance in IE and
Mozilla differs. In my test file

http://mcc.id.au/~cam/border.html

I have a large double border-left on the html element. I then have a
div whose margin-left is set to a negative value so it can be positioned
over the html's left border. The first problem is that in IE, the
html's left border is drawn over the div. The second is that in IE,
between the two strips of the double border, white is drawn (and
sometimes it forgets to redraw the middle section after other windows
have occluded it), whereas in Mozilla it is transparent.

I want the effect that I get in Mozilla. Is there some way I can work
around this problem of IE's (assuming that it is IE that's wrong)?

Screenshot of IE:

http://mcc.id.au/~cam/border-ie.png

Screenshot of Mozilla:

http://mcc.id.au/~cam/border-moz.png

Thanks,

Cameron

--
Cameron McCormack
| Web: http://mcc.id.au/
| ICQ: 26955922

Replies by e-mail must include the current month name in subject line to
bypass spam filter.
Jul 21 '05 #1
Share this Question
Share on Google+
12 Replies


P: n/a

P: n/a
brucie wrote:
http://validator.w3.org/check?uri=ht...am/border.html


Uh, ok, so what is your implicit message in that terse response? That I
should only post references to HTML files that can be validated? That
the validator rejecting the style attribute on the html element means
that my question is invalid?

Does this file

http://mcc.id.au/~cam/border2.html

which now validates, help you answer my question more easily?

Thanks,

Cameron

--
Cameron McCormack
| Web: http://mcc.id.au/
| ICQ: 26955922

Replies by e-mail must include the current month name in subject line to
bypass spam filter.
Jul 21 '05 #3

P: n/a
In comp.infosystems.www.authoring.stylesheets Cameron McCormack said:

http://validator.w3.org/check?uri=ht...am/border.html
Uh, ok, so what is your implicit message in that terse response?


http://diveintomark.org/archives/200..._help_you.html
--
v o i c e s
Jul 21 '05 #4

P: n/a
brucie wrote:
http://diveintomark.org/archives/200..._help_you.html


Well, I admit that I erred in including a style attribute on the html
element, but really it made no material difference to my question. (And
heaven forbid I should forget to include a title element!)

So, lest anyone think that validating solved my problem in this
instance, my question still stands. If anyone could help, I'd be grateful.

Thanks,

Cameron

--
Cameron McCormack
| Web: http://mcc.id.au/
| ICQ: 26955922

Replies by e-mail must include the current month name in subject line to
bypass spam filter.
Jul 21 '05 #5

P: n/a
Cameron McCormack <ca******@aka.mcc.id.au> wrote:
I have a couple of problems with borders, where the appearance in IE and
Mozilla differs. In my test file

http://mcc.id.au/~cam/border.html

I have a large double border-left on the html element. I then have a
div whose margin-left is set to a negative value so it can be positioned
over the html's left border.


Drop the border and the negative positioning, specify it as a background
image on the body element. IE has quirks if you try to style the html
element, and xhtml served as html doesn't need backgrounds to be
specified on the html element.

--
Spartanicus
Jul 21 '05 #6

P: n/a
Cameron McCormack wrote:
Hi.

I have a couple of problems with borders, where the appearance in IE and
Mozilla differs. In my test file

http://mcc.id.au/~cam/border.html


Try relative positioning rather than negative margins. I've never seen a
need to use negative margins which, to me, seems a hack and can give
inconsistent results with different browsers, as you're finding out.
Jul 21 '05 #7

P: n/a
Cameron McCormack wrote:
brucie wrote:
http://diveintomark.org/archives/200..._help_you.html

Well, I admit that I erred in including a style attribute on the html
element, but really it made no material difference to my question.


It makes a great deal of difference since no browser is obliged to
support it. You could try putting the style in the body element, or even
using a containing div.
Jul 21 '05 #8

P: n/a
On Sun, 24 Oct 2004, Cameron McCormack wrote:
brucie wrote:
http://diveintomark.org/archives/200..._help_you.html
Well, I admit that I erred in including a style attribute on the
html element, but really it made no material difference to my
question.


The point is that you could have worked that out beforehand in the
privacy of your own software, rather than initially dumping some
half-baked material onto usenet. It is demeaning for humans to be
enlisted to work on something that you could have done for yourself by
software.
(And heaven forbid I should forget to include a title element!)
I'd recommend against getting petulant when you've been found out.

Anyone can make a mistake, and I don't for a moment exclude myself in
that: but it's better if you can acknowledge the error when it's
pointed out, and simply move forwards from there.
If anyone could help, I'd be grateful.


It seems you've been fortunate and got some help already; but AFAICS
that was more "in spite of" your apparent attitude than because of it.
Jul 21 '05 #9

P: n/a
Alan J. Flavell wrote:
The point is that you could have worked that out beforehand in the
privacy of your own software, rather than initially dumping some
half-baked material onto usenet. It is demeaning for humans to be
enlisted to work on something that you could have done for yourself by
software.
Ok, I will validate before posting here in the future.
(And heaven forbid I should forget to include a title element!)

I'd recommend against getting petulant when you've been found out.


Sorry, I didn't mean to seem petulant, if it came across that way. I
just meant that refusing to help if my HTML was missing a title element
only would be a little harsh. (Which obviously wasn't true in my case,
just an extrapolation from the sentiments in Mark Pilger's blog entry.)
Anyone can make a mistake, and I don't for a moment exclude myself in
that: but it's better if you can acknowledge the error when it's
pointed out, and simply move forwards from there.
Yes, in addition to the mistake of including a style attribute on the
html element I admit that I was wrong to style the html element
altogether, and that such a mistake might well have invalidated my
original question.

I certainly can understand that in a lot of cases, tag soup is just too
difficult to debug, and that presenting some validating document will at
least then rule out problems which result from incorrect HTML.
It seems you've been fortunate and got some help already; but AFAICS
that was more "in spite of" your apparent attitude than because of it.


I'm sorry if I seemed indignant earlier. And I really am grateful for
people helping me with my CSS problem! :)

Thanks,

Cameron

--
Cameron McCormack
| Web: http://mcc.id.au/
| ICQ: 26955922

Replies by e-mail must include the current month name in subject line to
bypass spam filter.
Jul 21 '05 #10

P: n/a
Paul wrote:
It makes a great deal of difference since no browser is obliged to
support it. You could try putting the style in the body element, or even
using a containing div.


Ah, I didn't realise html shouldn't have style applied to it. (I had
thought (in the past) that I'd found inconsistent behaviour in applying
some styles to body and styling html gave better results.)

Thanks for pointing that out,

Cameron

--
Cameron McCormack
| Web: http://mcc.id.au/
| ICQ: 26955922

Replies by e-mail must include the current month name in subject line to
bypass spam filter.
Jul 21 '05 #11

P: n/a
Spartanicus wrote:
Drop the border and the negative positioning, specify it as a
background image on the body element.
Yeah, looks like I'll have to do use a background image to get the same
effect. Changing "margin-left: -66px" to "position: relative; left:
-66px" unfortunately didn't fix the occlusion problem.
IE has quirks if you try to style the html element, and xhtml served
as html doesn't need backgrounds to be specified on the html element.


Ok, thanks for your help.

Cameron

--
Cameron McCormack
| Web: http://mcc.id.au/
| ICQ: 26955922

Replies by e-mail must include the current month name in subject line to
bypass spam filter.
Jul 21 '05 #12

P: n/a
Paul wrote:
Try relative positioning rather than negative margins. I've never seen a
need to use negative margins which, to me, seems a hack and can give
inconsistent results with different browsers, as you're finding out.


Is there a way to preserve the width of the div (that is, keep it
covering nearly all the width of the page) when changing it to use
relative positioning? I notice that "width: 100%" still takes into
account the border width, so when I move the div to the left, it leaves
some gap at the right of the page. I would need something like "100% +
66px", but obviously I can't do that.

Thanks,

Cameron

--
Cameron McCormack
| Web: http://mcc.id.au/
| ICQ: 26955922

Replies by e-mail must include the current month name in subject line to
bypass spam filter.
Jul 21 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.