Wrox Programmer Forums
|
BOOK: Beginning ASP.NET Web Pages with WebMatrix
This is the forum to discuss the Wrox book Beginning ASP.NET Web Pages with WebMatrix by Mike Brind, Imar Spaanjaars ; ISBN: 978-1-1180-5048-4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET Web Pages with WebMatrix section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 23rd, 2012, 10:28 AM
Registered User
 
Join Date: May 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Styles Not Working Ch3 Designing Sites

My styles will not work on the start of the exercise in Ch3.

I'm using Chrome as the browser. Could that be the issue? I can I
change the default browser?

I'm only getting text when I run the page.
Thanks for help or suggestions.




This is where head content goes
This is where the navigation goes
This is where left content goes
This is where main content goes

This is where the footer goes
 
Old May 24th, 2012, 08:25 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Does it work in other browsers? Sounds more like your CSS file can't be found. Can you show the relevant code?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old May 27th, 2012, 10:47 PM
Registered User
 
Join Date: May 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Relevant Code.....

Imar...

Here is the code I am using....I just copied from page 55-57 exercises....



<!DOCTYPE html>

<html lang="en">
<head>
<meta charset=”utf-8” />
<title></title>
<link href=”StyleSheet.css” rel=”stylesheet” type=”text/css” />
</head>
<body>
<div id=”header”>
<div id=”head”>This is where head content goes</div>
</div>
<div id=”navstrip”>
<div id=”nav”>This is where the navigation goes</div>
</div>
<div id=”wrapper”>
<div id=”left”>
<div id=”search”>This is where left content goes</div>
</div>
<div id=”content”>
<p>This is where main content goes</p>
</div>
<div id=”footer”>
<p>This is where the footer goes</p>
</div>
</div>
</body>
</html>




here is the CSS.....



/*
-------------------------------------------------HTML ELEMENTS
-------------------------------------------------*/
body {
font-family :Verdana, Helvetica, sans-serif;
font-size:80%;
color:#5f5f5f;
padding:0;
margin:0;v
background-color:white;
}


/*
-------------------------------------------------SITE STRUCTURE
-------------------------------------------------*/
#header, #navstrip{
width:100%;
background-color:#4b4b4b;
}
#header{
min-height:70px;
color:white;
}
#navstrip{
border-bottom:2px solid #c3c4c8;
}
#head, #nav, #wrapper{
width:900px;
margin:auto;
}
#head{
font:normal 4em Tahoma;
line-height:2em;
}
#wrapper{
background-color:white;
border:2px solid #717171;
}
#nav{
background-color:#717171;
line-height:25px;
color:white;
}
#nav a, #nav a:hover, #nav a:visited{
color:white;
font-size:1.0em;
text-decoration:none;
text-transform:uppercase;
padding:5px 15px;
}
#left, #content{
float:left;
min-height:400px;
}
#left{
width:180px;
background-color:#e8e8e8;
}
#content{
width:700px;
background-color:white;
padding:10px
}
#footer{
clear:both;
font-size:90%;
color:#999;
text-align:center;
}
#nav, #login {
border-bottom:1px solid black;
padding-bottom:4px;
}
 
Old June 2nd, 2012, 08:08 PM
Registered User
 
Join Date: May 2012
Posts: 14
Thanks: 3
Thanked 1 Time in 1 Post
Wink

Quote:
Originally Posted by Axisbold2k2 View Post
Imar...

Here is the code I am using....I just copied from page 55-57 exercises....



<!DOCTYPE html>

<html lang="en">
<head>
<meta charset=”utf-8” />
<title></title>
<link href=”StyleSheet.css” rel=”stylesheet” type=”text/css” />
</head>
<body>
<div id=”header”>
<div id=”head”>This is where head content goes</div>
</div>
<div id=”navstrip”>
<div id=”nav”>This is where the navigation goes</div>
</div>
<div id=”wrapper”>
<div id=”left”>
<div id=”search”>This is where left content goes</div>
</div>
<div id=”content”>
<p>This is where main content goes</p>
</div>
<div id=”footer”>
<p>This is where the footer goes</p>
</div>
</div>
</body>
</html>




here is the CSS.....



/*
-------------------------------------------------HTML ELEMENTS
-------------------------------------------------*/
body {
font-family :Verdana, Helvetica, sans-serif;
font-size:80%;
color:#5f5f5f;
padding:0;
margin:0;v
background-color:white;
}


/*
-------------------------------------------------SITE STRUCTURE
-------------------------------------------------*/
#header, #navstrip{
width:100%;
background-color:#4b4b4b;
}
#header{
min-height:70px;
color:white;
}
#navstrip{
border-bottom:2px solid #c3c4c8;
}
#head, #nav, #wrapper{
width:900px;
margin:auto;
}
#head{
font:normal 4em Tahoma;
line-height:2em;
}
#wrapper{
background-color:white;
border:2px solid #717171;
}
#nav{
background-color:#717171;
line-height:25px;
color:white;
}
#nav a, #nav a:hover, #nav a:visited{
color:white;
font-size:1.0em;
text-decoration:none;
text-transform:uppercase;
padding:5px 15px;
}
#left, #content{
float:left;
min-height:400px;
}
#left{
width:180px;
background-color:#e8e8e8;
}
#content{
width:700px;
background-color:white;
padding:10px
}
#footer{
clear:both;
font-size:90%;
color:#999;
text-align:center;
}
#nav, #login {
border-bottom:1px solid black;
padding-bottom:4px;
}
What happens if you put the CSS code inside a <style> tag before the closing </head> tag?
 
Old June 3rd, 2012, 06:56 AM
Wrox Author
 
Join Date: Dec 2011
Posts: 57
Thanks: 1
Thanked 19 Times in 19 Posts
Default

It looks like you have copied and pasted from a PDF version of the book. The double quotes are all wrong. Replace them with real double quotes and it should work





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch3 Testing mod_rewrite speculumcm BOOK: Professional Search Engine Optimization with PHP: A Dev's Guide to SEO ISBN: 978-0-470-10092-9 1 September 8th, 2011 11:48 AM
Doesn't work: CH3 example super BOOK: Beginning Access 2007 VBA ISBN: 978-0-470-04684-5 1 July 22nd, 2010 05:12 PM
CH3 allowDefinition='MachineToApplication' jtavenner BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 2 May 2nd, 2008 07:57 AM
Ch3, P.76 - text.html/text.php not working Hostile BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 4 May 15th, 2004 11:09 AM





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