Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Works in Opera but not in IE

Reply
Thread Tools

Works in Opera but not in IE

 
 
Jeff
Guest
Posts: n/a
 
      01-28-2006
Hey

This code below works in Opera (version 8.51) but not in IE (version 6.0).
The error in IE is that this image isn't displayed:

#sidebar .sticker:after {
content:url(images/spacer.png);
display:block;
}

By the way this xhtml code is successfully validated by
http://validator.w3.org/

If you see what I'm doing wrong here, then I would be thankful if you could
tell me what I'm doing wrong here

((see my code below))

Best Regards

Jeff


**********************************
Here is a copy of my index.php file
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>title</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="main">
<div id="header">
<h1>hkjhasdkf</h1>
<h3>kjdfgkj</h3>
</div>

<div id="content">
<p>content</p>
<p>content2</p>
</div>

<div id="sidebar">
<div class="sticker">
<div class="title">about this site</div>
<div class="ingress">jalla</div>
</div>
<div class="sticker">
<div class="title">RSS</div>
</div>

<div class="sticker">
<div class="title">Search</div>
</div>

</div>


</div>



</body>
</html>
*************************
Here is a copy of styles.css file:
/* CSS Document */
#main {
width:760px;
position:relative;
margin-left:auto;
margin-right:auto;
height:700px;
}

#header {
color:#00FF99;
background-color:#ded6c6;
height:100px;
}

#sidebar{
width:180px;
right:0px;
position:absolute;
background-color:#CC3300;
}

#sidebar .sticker {
background-color:#00CC99;
}

#sidebar .sticker:after {
content:url(images/spacer.png);
display:block;
}

#sidebar .sticker .title {
background-color:#b5a58c;
text-align:center;
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
font-weight:bold;
text-transform:capitalize;

}

#sidebar .sticker .ingress {
background-color:#eeeeee;
}

#content{
width:580px;
top:auto;
left:0px;
position:absolute;
background-color:#9999FF;
}

h1 {
font-family:Arial, Helvetica, sans-serif;
font-size:36px;
text-align:right;
}

h3 {
font-family:Arial, Helvetica, sans-serif;
font-size:16px;
text-align:right;
padding-right:10px;
}



 
Reply With Quote
 
 
 
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      01-28-2006
Jeff wrote:

> Hey
>
> This code below works in Opera (version 8.51) but not in IE (version 6.0).
> The error in IE is that this image isn't displayed:
>
> #sidebar .sticker:after {
> content:url(images/spacer.png);
> display:block;
> }


IE doesn't recognize :before and :after. It's not an error, it's just a
badly designed operating system component.

Oh, always better if you link to a page at your web server rather than
posting code. You might want to look into fluid layout as well, and use
percentages for font sizes so folks with visual disabilities can resize
your text.

--
-bts
-Warning: I brake for lawn deer
 
Reply With Quote
 
 
 
 
Mike Massonnet
Guest
Posts: n/a
 
      01-30-2006
Beauregard T. Shagnasty wrote:

> Jeff wrote:
>
>> Hey
>>
>> This code below works in Opera (version 8.51) but not in IE (version
>> 6.0). The error in IE is that this image isn't displayed:
>>
>> #sidebar .sticker:after {
>> content:url(images/spacer.png);
>> display:block;
>> }

>
> IE doesn't recognize :before and :after. It's not an error, it's just a
> badly designed operating system component.
>


yes and also for min(|max)-width and min-(|max)height ...

--
Besides, including <std_ice_cubes.h> is a fatal error on machines that
don't have it yet. Bad language design, there...
-- Larry Wall in <(E-Mail Removed)>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A JS script which works fine in IE / FF, but not in Opera... (?) Fox Javascript 5 08-20-2007 10:01 AM
This function works as intended in Firefox, but not IE 6 or Opera. Bob Javascript 3 10-01-2006 06:16 PM
Dynmically creating elements in a table works with firefox, opera, but not ie patrickkellogg Javascript 3 07-10-2006 11:36 PM
newbie: This CSS works in IE but not in FireFox, Opera, Netscape Jeff HTML 3 06-23-2006 01:42 PM
Works in IE but not in Opera or Firefox John Dalberg HTML 29 11-03-2004 08:44 PM



Advertisments