Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 13th, 2010, 02:41 AM
Registered User
 
Join Date: Apr 2010
Location: Converse, Texas
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 6: Sidebar Goes Here

In chapter 6 the Sidebar is on the left side and not the right. I tried to change the CSS Code to right instead of left and not change. Here is the code that I have below.

<form id="form1" runat="server">
<div id="PageWrapper">
<div id="Header"><a class="HeaderLink" href="~/" runat="server">Header Goes here</a></div>
<div id="MenuWrapper">Menu Goes Here</div>
<div id="MainContent">
<asp:ContentPlaceHolder ID="cpMainContent" runat="server">
</asp:ContentPlaceHolder>
</div>
<div id="SideBar">Sidebar Goes Here</div>
<div id="Footer">Footer Goes Here</div>
</div>
</form>

CSS Code Below:

#Sidebar
{
background-color: #808080;
width: 200px;
float: right;
}
Reply With Quote
  #2 (permalink)  
Old April 13th, 2010, 02:48 AM
Registered User
 
Join Date: Apr 2010
Location: Converse, Texas
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default I found my errors:

My CSS code shows Sidebar and I typed into the MasterPage SideBar. Lastly, in the book the CSS code has float: left so I changed it to float: right and now it matches what the image shows in the book.
Reply With Quote
  #3 (permalink)  
Old April 13th, 2010, 03:31 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Take a look at the source for chapter 6 that comes with the book as a download. In Monochrome.css you find this:
Code:
 
 
#MainContent
{
  font-size: 0.8em;
  width: 659px;
  border-left: 1px solid white;
  border-right: 2px solid white;
  float: left;
  background-color: #e1e1e1;
  min-height: 500px;
  padding: 10px;
}
 
#Sidebar
{
  font-size: 0.8em;
  background-image: url(Images/Sidebar.jpg);
  background-repeat: no-repeat;
  background-color: #cccccc;
  width: 152px;
  min-height: 500px;
  padding-top: 10px;
  padding-left: 10px;
  float: left;
}
Both have a float left which causes them to end up side by side. This works if the id attributes of the MainContent and Sidebar (including capitalization) match the CSS selectors.

Hope this helps,

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!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you position the Sidebar at absolute top-right? saidrad BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 11 April 12th, 2009 07:42 AM
Unanswered posts link on sidebar bmains Forum and Wrox.com Feedback 6 December 20th, 2008 06:16 AM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM
Header and Sidebar of MasterPage not shown KamalRaturi ASP.NET 2.0 Professional 0 August 27th, 2006 04:45 PM
Sidebar loading through reflection? bmains C# 2005 0 October 20th, 2005 10:21 PM



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


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