Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 November 8th, 2009, 05:18 PM
epc epc is offline
Registered User
 
Join Date: Jul 2008
Posts: 7
Thanks: 4
Thanked 0 Times in 0 Posts
Default Header Image Display Issue

I am applying the concepts of this book to building my own site and I am having an issue with displaying my header image size 814px X 200px. Specifically, the image displays fine in VWD, but as soon as I do ctrl + F5 to view in the browser there is no image diplayed. Here is my CSS code.

*
{
font-family: Tahoma,Verdana,Sans-Serif;
}
body
{
background-color: #dcdcdc;
margin: 10px000;
}
h1
{
font-size: 1.25em;
}
#PageWrapper
{
margin-left: auto;
margin-right: auto;
width: 814px;
border: 15pxdoublewhite;
}
#MenuWrapper
{
background-color: white;
width: 794px;
height: 50px;
padding-left: 10px;
padding-right: 10px;
}
#Header
{
background-image: url(/Images/header.jpg);
width: 814px;
height: 200px;
}
#MainContent
{
background-color: White;
width: 794px;
font-size: 0.8em;
padding: 10px;
min-height: 380px;
}
#Footer
{
background-color: black;
width: 814px;
height: 37px;
color: White;
text-align: center;
font-size: 0.7em;
font-weight: bold;
line-height: 37px;
}


Thank you!
 
Old November 8th, 2009, 06:35 PM
Authorized User
 
Join Date: Jun 2009
Posts: 70
Thanks: 18
Thanked 1 Time in 1 Post
Default

Try background-image: url('/Images/header.jpg'); (note the quotes). Also check that you have set the site's virtual path to / (see page 243 Try it Out para 1. and also the explanation starting at page 238).

Hope that helps.
The Following User Says Thank You to kiwibrit For This Useful Post:
epc (November 8th, 2009)
 
Old November 8th, 2009, 10:24 PM
epc epc is offline
Registered User
 
Join Date: Jul 2008
Posts: 7
Thanks: 4
Thanked 0 Times in 0 Posts
Smile

I remember the concept about setting the virtual path to /, but I forgot how important this was. This fixed my problem. Thanks you very much!
 
Old November 9th, 2009, 01:53 PM
Authorized User
 
Join Date: Jun 2009
Posts: 70
Thanks: 18
Thanked 1 Time in 1 Post
Default

You are very welcome. I am finding asp.net to be very powerful - but there is a lot to remember.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload image-create & save thumbnail-display image angshujit ASP.NET 2.0 Professional 6 July 11th, 2013 10:34 PM
How to center the header image kherrerab BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 May 29th, 2010 11:51 PM
Multiple Image Header Layout rodmcleay CSS Cascading Style Sheets 5 March 22nd, 2008 06:31 PM
How to insert in image in a header programatically Michael109 Word VBA 2 April 4th, 2007 09:41 AM
display diff header footer pallavijyo BOOK: Professional Crystal Reports for VS.NET 1 October 5th, 2005 03:56 PM





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