Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : in C# and VB 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 February 21st, 2016, 08:30 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

A padding of 0 shouldn't add white space to the top of an element. Are you sure there wasn't another h6 rule at work?

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 February 21st, 2016, 09:33 AM
Authorized User
 
Join Date: Nov 2014
Posts: 91
Thanks: 2
Thanked 1 Time in 1 Post
Default Locking the Web Page at the Top

Hi Imar,

Here is my modified CSS File. I see no h6 style. But, as you know, I sometimes get blinded.
Code:
header {
  background-color: lightskyblue;
  width: 844px;
  height: 86px;
  font-size: 75px;
  font-family: Trebuchet MS;
  font-style: oblique;
  font-weight: bold;
  text-align: center;
}

* {
  font-family: Arial;
}

h1 {
  font-size: 25px;
  padding: 0;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 15px;
}

.Introduction {
  font-style: italic;
  color: #003399;
  font-size: 14px;
  padding-right: 5px;
}

.Fish {
  font-size: 15px;
  font-weight: bold;
  padding-right: 5px;
}

.Paragraph {
  font-size: 15px;
  padding-right: 8px;
}

.Picture {
  font-size: 12px;
  padding-right: 10px;
}

.Location {
  font-size: 12px;
}


#PageWrapper {
  width: 844px;
  margin: auto;
}

nav {
  background-image: url(Images/MenuBackground.jpg);
  width: 826px;
  height: 36px;
  padding-top: 7px;
  padding-left: 17px;
}

/*#region Main Content */
section#MainContent {
  width: 664px;
  float: left;
  border-color: black;
  border-right-color: black;
}

  section#MainContent a {
    color: #4cff00;
    text-decoration: underline;
  }

    section#MainContent a:visited {
      color: #FF0000;
      text-decoration: underline;
    }

    section#MainContent a:hover {
      color: #FFA500;
      text-decoration: underline;
    }
/*#endregion*/

aside {
  background-color: lightskyblue;
  width: 180px;
  height: 678px;
  float: left;
}

footer {
  background-color: lightskyblue;
  font-weight: bold;
  text-align: center;
  width: 844px;
  clear: both;
}

div.center-align {
  text-align: center;
}

u1.level1 {
  font-size: 14px;
  font-weight: bold;
  height: 19px;
  line-height: 19px;
}

  u1.level1 .selected {
    background-color: #509EE7;
  }

a.level1 {
  padding-left: 5px !important;
}

a.level2 {
  background-color: #555555;
  padding-left: 8px;
}

  a.level1:hover, a.level2:hover {
    background-color: #509EE7;
  }

.MainMenu {
  /*
    The Menu gets a white border on all four sides.
  */
  border: 1px solid #999999;
  width: 800px;
  height: 19px;
  background-color: #555555;
}

  .MainMenu ul li {
    /*
    Gives the four menu items in the main menu a width of 200px each.
  */
    width: 200px;
  }

img.position {
  float: left;
  padding-right: 5px;
}

figure {
  padding-right: 3px;
}

figcaption {
  font-weight: bold;
  text-align: left;
  font-size: 12px;
  height: 0px;
  width: 183px;
}

.ErrorMessage {
  color: red;
}

.PleaseWait
{
  height: 32px;
  width: 500px;
  background-image: url(Images/PleaseWait.gif);
  background-repeat: no-repeat;
  padding-left: 40px;
  line-height: 32px;
}

.Attention
{
  border: 4px solid red;
  padding: 10px 0;
  width:  100px;
  margin: auto;
  display: block;
  text-align: center;
}
I did not think the padding of 0 would cause the line breaks either. However wouldn't the 'height' and 'font-size' in my original CSS file cause the line breaks? The height was deleted from the original header style.

Last edited by phztfte1; February 21st, 2016 at 09:55 AM.. Reason: To add clarification
 
Old February 21st, 2016, 11:02 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

>> However wouldn't the 'height' and 'font-size' in my original CSS file cause the line breaks?

Yes, probably. But it sounded like the gap was bigger than 86 pixels.

Anyway, hard for me to say without seeing this all run.

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 February 21st, 2016, 01:37 PM
Authorized User
 
Join Date: Nov 2014
Posts: 91
Thanks: 2
Thanked 1 Time in 1 Post
Smile Locking the Web Page at the Top

Hi Imar,

Thanks to you and your book, I now am a published website developer. It is a simple website, but good enough for my first one. You can see that the line spaces were eliminated. My website is http://kenairiverhale.com.

If not for your help, I would have been stuck at Chapter 10 and totally frustrated. I greatly appreciate the time you took to correct my errors and to teach me more efficient ways to do the coding.

Keep up the good work.

Respectfully,
Dexter Tom
 
Old February 22nd, 2016, 12:00 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Congratulations on going live: great work.

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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does page scroll to top? dotnetDeveloper ASP.NET 2.0 Basics 7 July 28th, 2008 01:57 PM
Chapter 15 p.774 at the top of page shade cat BOOK: Ivor Horton's Beginning Visual C++ 2005 0 June 5th, 2007 03:04 PM
Repositioning Top Left Corner of a Page in print dontknowmuch Java GUI 0 September 30th, 2005 12:05 PM
question asked(bring flash page to the top) ExxWhyZee Flash (all versions) 1 April 13th, 2004 12:48 PM
Sync Top Frame with Web Page savoym HTML Code Clinic 1 January 20th, 2004 04:36 PM





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