473,413 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Border problems

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
12 2377
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
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

33
by: Thomas Mlynarczyk | last post by:
Hi, I'm looking for a way to put a 1px solid border around the image in this link: <a href="some.html"><img src="some.gif"></a> Well, that, by itself, is simple. However, I would like to have a...
7
by: Mary Ellen Curtin | last post by:
The client wants the page to have both a left border (purple) and a right border (green). Is there any way to stretch a background image to fit the viewport? Or should I divide the background...
4
by: David Ehmer | last post by:
I have some buttons I'm working on at this address http://www.boatingaccessories.com.au/test3.htm In NS7, Mozilla and Opera, the borders don't render. IE6 displays as intended. Appreciate...
7
by: Marek Mänd | last post by:
When using <TABLE rules="all"> Mozilla 1.6 and previous versions draw a nasty interiour border, which doesnt go away though I have on TD's css border:none set. Is it something wrong with my...
19
by: Eva | last post by:
Hi, I'm really really really new to javascripts and so i couldn't really comprehend thoroughly on the the previous posts regarding this issue. Anyways, I'm setting up a picture album site....
1
by: Keith Smith | last post by:
When I use this code.... window.open('gallery/pic1.jpg','windowname','width=775,height=550,resizable=yes,scrollbars=yes,top=10,left=10'); ....my web page displays a picture with a white border...
3
by: Tim | last post by:
hi, I have some code that works in all web browsers except IE 5.2 for Mac (heard this one before? :-) the CSS code basically creates two id's, one is a container for the other. eg: CSS...
2
by: Asterbing | last post by:
Hi all. I'm trying and don't succeed to include an HTML page into another without any border nor visible scroll-bar. Even if I would like something which will work under Netscape too, at this...
0
by: silco | last post by:
Hi Everyone.. hope you can help! I have a IE6 border bug, most of the common fixes tell me to use relative on my container divs. This fixed some problems but now I have a left border problem...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.