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 August 12th, 2010, 04:01 PM
Authorized User
 
Join Date: Aug 2010
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via AIM to rexcampbell
Default Ch. 3 pg. 75 Try It Out Trouble

I'm having trouble getting my side bar to float with my main content area. My side bar wants to be between the main content area and the floater when I view it in design mode. As far as I can tell, my Style Sheet code is looking right and everything looks where it should be in the Markup View. HALP!
 
Old August 12th, 2010, 06:25 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Can you post the final HTML code for the page and for the CSS files that it's referencing? Otherwise, it's pretty impossible to say anything useful.

When you post code, please use the Remove Text Formatting on the toolbar and wrap your code in code tags. That makes it easier to read.

Cheers,

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 August 16th, 2010, 06:30 PM
Authorized User
 
Join Date: Aug 2010
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via AIM to rexcampbell
Default Sorry it took a while to reply

Alright, here is the default code page:

Code:
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!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></title>
    <style type="text/css">
        .style1
        {
            color: #009933;
        }
    </style>
    <link href="Styles/Styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div id="PageWrapper">
    <div id="Header">Header Goes Here</div>
    <div id="MenuWrapper">Menu Goes Here</div>
    <div id="Main Content">
    <h1>
            Hi there visitor and welcome to Planet Wrox</h1>
        <p>
            We're glad you're <span class="style1">paying a visit</span> to
            <a href="http://www.PlanetWrox.com">www.PlanetWrox.com</a> , the coolest music 
            community site on the Internet.</p>
        <p>
            Feel free to have a look around; as there are lots of interesting <b>reviews and 
            concert pictures</b> to be found here.</p></div>
    <div id="Sidebar">Sidebar Goes Here</div>
    <div id="Footer">Footer Goes Here</div>
    </div>
    </form>
</body>
</html>
And here is the styles page:

Code:
#Header
{
    background-color: #C0C0C0;
    width: 844px;
    height: 83px;
}

*
{
    font-family: Arial;
}

h1
{
    font-size: 20px;
}

#PageWrapper
{
    width: 844px;
}

#MenuWrapper
{
    width: 844px;
}

#MainContent
{
    width: 644px;
    float: left;
}

#Sidebar
{
    background-color: #808080;
    width: 200px;
    float: left;
}
Hope I posted that right. Thanks for the input.
 
Old August 17th, 2010, 02:17 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yep, you posted that right......;-)

Take a look at this:
Code:
<div id="Main Content">
There's a space between Main and Content which causes the MainContent class to not be applied. Once you remove the space the SIdebar jumps in place.
Then you'll notice that the Footer is not behaving because your style sheet is missing this rule set:

Code:
 
#Footer
{
  background-color: #C0C0C0;
  width: 844px;
  clear: both;
}
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!
 
Old August 17th, 2010, 02:29 AM
Authorized User
 
Join Date: Aug 2010
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via AIM to rexcampbell
Default

Alright, all is as it should be. Thanks for the help.





Similar Threads
Thread Thread Starter Forum Replies Last Post
save images in size .75 X .75 infotech VB How-To 2 May 11th, 2007 05:54 PM
Chapter 2 Pg. 75-77 while function joshkosmala BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 February 28th, 2007 04:27 PM
Chapter 10 pg. 339 trouble Tachyon BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 March 12th, 2004 03:39 PM
CH 5 pg 160 wadesmart BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 8 November 12th, 2003 11:23 PM
CH 3 pg 76 wadesmart BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 October 26th, 2003 08:46 PM





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