473,387 Members | 1,486 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,387 software developers and data experts.

Specifying width makes IE change border colours


Hi,

I'm having a strange problem (sample code below) and I'm hoping
somebody can give me some pointers.

If I leave the "width" rules out of the CSS then both IE (v5 and v6)
and Firefox (v1.0) render the page the same way; ie. purple body
background, div with white background and double border (two thin
strips - outer white, inner purple).

If I put the width rules back in, Firefox reduces the width of the div
and everything else says the same. But IE for some reason now renders
every part of the border purple; effectively a displaying a solid
boder.

Is there any way to specify a width for the div but still keep the
double border in IE?

TIA

==== csstest.css ====
body {
background-color: #7e4189;
text-align: center;
}

#content {
text-align: left;
background-color: #ffffff;
position: relative;
margin: 0 auto;
border-style: double;
border-width: 5px;
border-color: #7e4189;
padding: 20px;
/* Box model hack */
width: 600px;
voice-family: "\"}\"";
voice-family: inherit;
width: 550px;
}

==== csstest.html ====

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"
/>
<link rel="stylesheet" type="text/css" href="./csstest.css" />
<title>CSS Test</title>
</head>
<body>

<div id="content">

<p>Text goes here!</p>

</div>
</body>
</html>

==============
Jul 21 '05 #1
2 1822
That is odd, and unfortunately I can't see why it's happening.

You could achieve a similar effect in IE by setting the border-color to
#ffffff:

<!--[if IE 5]>
border-color: #ffffff;
<![endif]-->
If you do figure it out, please post the solution!
--
niall

Jul 21 '05 #2
Hi Niall,

Thanks for the suggestion. It does workaround the problem. If I find
a better way I'll post it here for sure.

Thanks again.

"de******@gmail.com" <de******@gmail.com> wrote:
That is odd, and unfortunately I can't see why it's happening.

You could achieve a similar effect in IE by setting the border-color to
#ffffff:

<!--[if IE 5]>
border-color: #ffffff;
<![endif]-->
If you do figure it out, please post the solution!


Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Alex Shi | last post by:
In php, is there a way obtain the width of a charactor of a certain font? Alex -- ================================================== Cell Phone Batteries at 30-50%+ off retail prices!...
0
by: pathisunil | last post by:
Dear All I have an xmldocument which is as formed below. It is a bit of loopy in nature. can anyone kindly let me know how can i write a xslt which would take a parameter which is an attribute...
4
by: N. Demos | last post by:
The following code renders as intended in IE (A TABLE, with cells of fixed width and height, inside of a DIV with fixed width and height and overflow set to hidden.) In Firefox, the table cells...
2
by: Stewart | last post by:
Originally posted in comp.lang.javascript: Newsgroups: comp.lang.javascript From: "Stewart" Date: 23 Aug 2005 02:50:04 -0700 Local: Tues, Aug 23 2005 10:50 am Subject: FireFox, RemoveChild,...
2
by: Robson Carvalho Machado | last post by:
Dear friends, I'm dynamically creating a Hyperlink with spacer.gif as ImageURL that is an 1px transparent image only to determine link position, but as I create this link dynamically I could not...
50
by: Shadow Lynx | last post by:
Consider this simple HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 STRICT//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head>...
16
by: FuzzyLogik | last post by:
By width, I don't mean weight. I have a row of <li>'s, with a bottom-border. I want the bottom-border to only go 90% of the <li> (centered) Is there any way to do this? I have it in this...
31
by: Sarita | last post by:
Hello, this might sound stupid, but I got a really nice homepage template which unfortunately is a 3-Column Fixed Width CSS format. Now I don't have any content for the right column and would...
10
by: magnesium | last post by:
I have this under-construction page, If you try and select the link coming from the bottom with your mouse, you'll notice, that before the actual link is selected, the td background will change. you...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.