 |
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
|
|
|
|
|

June 15th, 2010, 05:45 AM
|
|
Authorized User
|
|
Join Date: Nov 2009
Posts: 23
Thanks: 7
Thanked 0 Times in 0 Posts
|
|
Problem with Control's text placement
Hi
I have a little problem, when I add a control like the ChangePassword control to a page.
All the text and buttons regarding the control is placed in the upper left corner of the page. The text and buttons are placed on top of each other. How do I prevent this ?
In my style sheet I write:
*
{ position:absolute}
Best regards,
Bo
|
|

June 15th, 2010, 06:37 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
It's because of the position: absolute. When you use that, you must specify a location explicitly using properties such as top and left. But why are you using this? Are you using this in the Planet Wrox sample web site? It doesn't need it as the design is based on a flow-layout.
Cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

June 15th, 2010, 07:50 AM
|
|
Authorized User
|
|
Join Date: Nov 2009
Posts: 23
Thanks: 7
Thanked 0 Times in 0 Posts
|
|
You are right. It was because I used "position: absolute". I tried to change it to "relative" and "static" before I wrote above question. At that time it did not help. But now it is working, so thank you!
I use "position: absolute" because it is easy for me to place text, buttons ect. precisely where I want them to be. Is it poor programming praxis? I am not using it for your book examples. I have already finished all the very good examples.
Thank you for your help!
Best regards,
Bo
|
|

June 15th, 2010, 07:59 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
It's not necessarily a bad practice, but a different practice.
I find flow layouts easier to maintain. With an absolute positioned layout, moving stuff or adding stuff in between other elemenets becomes much harder as you have to update more CSS definitions.
Cheers,
Imar
|
|

June 21st, 2010, 01:52 PM
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi, New Guy Here;
I recently purchased and got to using the âBeginning ASP.NET 3.5 in VB and C#. Iâm somewhere in chapter 10 now; and everything is going on smoothly.
The only problem is that I canât seem to get the pages of the website to be centralised. It always comes out âLeft Alignedâ. I even tried using tables to correct this in the MasterPage, but it did not work. Is there anyway I can get around this?
Thanks.
|
|

June 21st, 2010, 05:32 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
What do you mean by centralised? The entire site within the browser? Or the content within the pages. Is the difference between http://aspnet35.planetwrox.com/ and http://aspnet4.planetwrox.com/ the effect you're looking for?
Imar
|
|

June 24th, 2010, 02:22 PM
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi there,
What do you mean by centralised? The entire site within the browser? Or the content within the pages. Is the difference between http://aspnet35.planetwrox.com/ and http://aspnet4.planetwrox.com/ the effect you're looking for?
Imar
##################################
Yea, I'm talking about the entire website; like the one in http://aspnet4.planetwrox.com/ --That site is centralised...not just the contents of the page.
Thanks.
|
|

June 25th, 2010, 04:43 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
In the PlanetWrox 4 web site, this is done with CSS code like this:
Code:
#PageWrapper
{
width: 844px;
margin: auto;
}
margin: auto means as much as: âdivide whatever room youâve left between the two edgesâ (left and right; auto doesnât vertically center the content) causing the item to appear centered. In order for the browser to calculate âwhatâs leftâ, the item youâre applying this to needs to have a fixed width (844 pixels in this case).
Hope this helps,
Imar
|
|

June 26th, 2010, 11:22 AM
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks the info. It really was useful.
merryMan.
|
|
 |