p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 4.5 : in C# and VB (http://p2p.wrox.com/forumdisplay.php?f=710)
-   -   Chapter 3 - Try it out - Styling PW Homepage (http://p2p.wrox.com/showthread.php?t=93133)

mohamad June 23rd, 2014 12:52 AM

Chapter 3 - Try it out - Styling PW Homepage
Hi there,

While doing the TIO - Styling the Planet Wrox Homepage, the browser(IE8) page does not display correctly as per default.aspx below:-
Styles.css paste below for reference.

I have installed modernizr library to the site, what is wrong?

<%@ Page Language="VB" %>

<!DOCTYPE html>

<script runat="server">

Protected Sub Page_Load(sender As Object, e As EventArgs)

End Sub

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<style type="text/css">
.auto-style1 {
color: #990033;
<link href="MasterPages/Styles/Styles.css" rel="stylesheet" />
<form id="form1" runat="server">
<div id="PageWrapper">
<header>Header Goes Here</header>
<nav>Menu Goes Here</nav>
<section id="MainContent">

<h1>Hi there visitor and welcome to Planet Wrox</h1>

<aside ="Sidebar">Sidebar Goes Here</aside>
<footer>Footer Goes Here</footer><p>
We're glad you're<span class="auto-style1"> paying a visit</span> to <a href="http://www.PlanetWrox.com">www.PlanetWrox.com</a>, the coolest music community site on the internet. and concert</p>
Feel free to have a look around; there are lots of interesting <strong>reviews and concert pictures</strong> to be found here.</p>


Reference from styles.css

background-color: #C0C0C0;
width: 844px;
height: 86px;
font-family: Arial;
font-size: 20px;
width: 844px;
margin: auto;
width: 844px;
section#MainContent {
width: 664px;
float: left;
background-color: Gray;
width: 180px;
float: left;
background-color: #C0C0C0;
width: 844px;
clear: both;

Imar June 23rd, 2014 09:34 AM

It looks like your reference to the CSS file is incorrect as it's referring to it as a sub folder of the Master Pages folder.

Have you downloaded the source that comes with the book? That way you could compare your code with mine.



mohamad June 23rd, 2014 11:56 AM

Thanks Imar,

After some changes of coding location, all browsers (opera,safari,chrome,mozilla) display the default.aspx
with Header/Menu/Sidebar/Footer correctly as intended except IE8.

After installing IE9, it display correctly.


All times are GMT -4. The time now is 09:10 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.