IE8 web slice - CSS problem
Posted
by rjovic
on Stack Overflow
See other posts from Stack Overflow
or by rjovic
Published on 2010-04-27T19:38:27Z
Indexed on
2010/04/27
19:53 UTC
Read the original article
Hit count: 346
Again me with IE8 web slice :) This time i have following problem. I created web slice for IE8 and created button for users where they can choice to add it to their browsers. Code is :
<input class="add" type="button" value="Dodaj Xica web slice u IE8!" onclick='window.external.AddToFavoritesBar("http://localhost:51914/Home/GetWebSlice", "xica.rjovic.com", "slice");' />
There is everything fine, and web slice is added to IE8 and web page is displayed correct. But I have problem with CSS in web slice. I defined css in it, but when web slice i rendered there are only black fonts without any css properties. My web slice is defined as :
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
<!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 runat="server">
<title>GetWebSlice</title>
<style type="text/css">
p {color: white; }
body {background-color: blue; }
.container {background-color: red;}
</style>
</head>
<body>
<div class="hslice container" id="xica">
<h2 class="entry-title container">Xica web slice</h2>
<div class="entry-content">
<h2>Saldo : <b><%= ViewData["total"] %></b></h2>
<p><%= ViewData["cardNumber"] %></p>
<p>Status : <%= ViewData["status"] %></p>
</div>
</div>
</body>
</html>
When I try to see web slice directly in my browser then everything is ok, and css is show as expected. Thank you...!
EDIT : here is the picture of problem : http://www.deviantpics.com/share-2F10_4BD73E25.html
© Stack Overflow or respective owner