jkmyoung 2,057
Recognized Expert Top Contributor
I seem to be missing the borders from div.level1 and div.level2 when viewed in FireFox or Opera. Simplified version of the code. -
<?xml version="1.0" encoding="UTF-8"?>
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
<HTML>
-
<head>
-
<title>Useful Links</title>
-
<style type="text/css">
-
body{background-color: #000000;
-
margin:0px;
-
border:0px;
-
padding:10px;}
-
div.level1 {border: medium double rgb(200,200,200)
-
margin: 0px;
-
padding:10px;}
-
h1 {font-size:150%;
-
color: #0000FF;
-
margin:0px;
-
border:0px;
-
padding:0px;}
-
div.level2 {padding:0px, 10px;
-
border: medium groove rgb(111,111,111)
-
margin: 0px;}
-
h2 {font-size:130%;
-
color: #11EE11;
-
margin:0px;
-
border:0px;
-
padding:0px;}
-
div.link {margin:3px, 10px;}
-
-
a {font-weight: bold;}
-
a:link {color: #FFFFFF;}
-
a:visited {color: #FFFFFF;}
-
a:hover {color: #0000FF;}
-
a:active {color: #FF0000;}
-
a.new {font-size: 60%;}
-
-
</style>
-
</head>
-
<body>
-
<div class="level1">
-
<h1>Admin</h1>
-
<div class="level2">
-
<h2>Applications</h2>
-
<div class="link"><a href="http://www.google.ca" class="main">Google</a> <a href="http://www.google.ca" target="_blank" class="new">New Window</a></div>
-
</div>
-
</div>
-
</body>
-
</HTML>
-
Am I declaring border styles incorrectly? Mostly just copied examples from w3schools.
Versions used:
IE 6.0 sp2
Firefox 3.0.3
Opera 9.5.1
3 4685
I'm no expert but after a quick look I noticed you forgot to add a semicoln after your borders in the declaration. - <?xml version="1.0" encoding="UTF-8"?>
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
<HTML>
-
<head>
-
<title>Useful Links</title>
-
<style type="text/css">
-
body{background-color: #000000;
-
margin:0px;
-
border:0px;
-
padding:10px;}
-
div.level1 {border: medium double rgb(200,200,200);
-
margin: 0px;
-
padding:10px;}
-
h1 {font-size:150%;
-
color: #0000FF;
-
margin:0px;
-
border:0px;
-
padding:0px;}
-
div.level2 {padding:0px, 10px;
-
border: medium groove rgb(111,111,111);
-
margin: 0px;}
-
h2 {font-size:130%;
-
color: #11EE11;
-
margin:0px;
-
border:0px;
-
padding:0px;}
-
div.link {margin:3px, 10px;}
-
-
a {font-weight: bold;}
-
a:link {color: #FFFFFF;}
-
a:visited {color: #FFFFFF;}
-
a:hover {color: #0000FF;}
-
a:active {color: #FF0000;}
-
a.new {font-size: 60%;}
-
-
</style>
-
</head>
-
<body>
-
<div class="level1">
-
<h1>Admin</h1>
-
<div class="level2">
-
<h2>Applications</h2>
-
<div class="link"><a href="http://www.google.ca" class="main">Google</a> <a href="http://www.google.ca" target="_blank" class="new">New Window</a></div>
-
</div>
-
</div>
-
</body>
-
</HTML>
-
I added them in and it seems to work in the browsers you mentioned for me.
jkmyoung 2,057
Recognized Expert Top Contributor
Ah,ok thanks. can't believe it was something that stupid. Error didn't show when I validated with w3c. Curse IE6 for rendering invalid pages.
Another problem you will have is that you are using the xml declaration on the first line. It is correct to do this but only modern browsers understand it while IE6 will go into quirks mode and not attempt to perform like a modern browser.
Also, case matters in XHTML. Your closing tag </HTML> will be flagged by the validator. Not that is matters because you aren't serving XHTML anyway and no version of IE handles XHTML either.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Red |
last post by:
This is apparently an ie display bug, I can't seem to figure out which
ie bug this is.
a 3 sided border is created by wrapping the 'inner' box in the 'middle'
box and padding the 'middle' box 1px on 3 sides. It looks the same in
firefox and ie.
Then the same box is wrapped in yet another box with a red border on the
bottom. In Firefox the 'middle' box still has padding on only 3 sides,
and the red border is showing on the bottom. In...
|
by: Trent L |
last post by:
Hello,
I'm having a problem where a style for a <a> tag
isn't working in IE:
border : 1px solid red;
If you use my code below, you'll see what I mean.
In IE6 on WinXP, I'm not seeing a red top and
bottom border. My HTML validates. It looks
|
by: Vegard Beider |
last post by:
This works fine in Opera and IE, but in Firefox 1.0 there seems to be
a problem. With border-collapse set to collapse, it indents the table
1px to the left. Any ideas how to resolve this without any browser
specific hacks?
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">...
|
by: Alexander Mueller |
last post by:
Hi,
the following div is 38 pixels high in IE and Opera, however 42 pixels
in Firefox (apparently it calculates the height exclusively the border
width)
<div style="background-color: #000000; height: 38px; border: 2px
solid #FF0000;"></div>
Now, I dont know which of them is right, but I would like to know
|
by: Andreas König |
last post by:
Hello group,
this is my first message to a newsgroup so I hope I've done everything
right ;-)
My problem is that I'd like to have a border via css. This seems to be
working on the IE, but not on my favourite Browser Firefox ;-)
Firefox shows the border if the site in the frame has not been loaded
yet. But if the site shows up the border seems to be overwritten..
| |
by: Rhino |
last post by:
Yesterday, I reworked the index on my site - http://sfl.london.on.ca - so
that they used list markup and I'm quite pleased with them. However, I'm
having a problem with one small aspect of the menu and could use some help
in fixing it.
The problem is that I want the index to always highlight the link for the
content which is currently being displayed on the right hand side of the
page. This behaviour should be over and above the...
|
by: jason.m.ho |
last post by:
Has anyone run into the problem of firefox 'border-collapse: collapse'
rendering a table 1-pixel too far to the left? In IE and Opera it will
render fine...Does anyone know if this is a bug? This property only
holds true in standards compliance mode (quirks mode firefox renders it
fine). For example, if you had the following code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
|
by: petermichaux |
last post by:
Hi,
I would like to display a message to Internet Explorer clients to
encorage them to get Firefox. Yes they may like Internet Explorer but
it is my site :)
http://www.explorerdestroyer.com/ uses navigator.userAgent
If ((ua.indexOf('msie') != -1) &&
(ua.indexOf('opera') == -1) &&
|
by: =?Utf-8?B?TG91IDYy?= |
last post by:
010498007741048
This number pops up in search boxes at intermittent times..I have no idea
why it does or how to delete it. Could it be some kind of malware or
virus/spyware running in the background?
I am using Windows XP on an old Dell Dimension, with Opera as my browser.
Any ideas on how to find out what is causing this to show up? How to delete
it ? and how to prevent it from happening again?
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |