473,568 Members | 2,762 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Positioning with 2.0

I just installed VS 2005. Was working with 2003 and .Net 1.1. Trying to get the feel for a master page and I'm having some issues. I'm looking for a pretty basic setup. Standard header with an image, forced to lower right of screen, in the content area. I had this working just fine in 1.1, but the tags seem to behave quite differently in 2.0.

If I remove the !DOCTYPE element, I get what I want. Is it dangerous to remove this? How can I acheive the effect I want using proper 2.0 stuff? Here's some code:
<%@ Master Language="VB" CodeFile="Maste rPage.master.vb " Inherits="Maste rPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">
<title>Welcom e To...</title>
</head>
<body style="backgrou nd-color: #006b58;">
<form id="form1" runat="server">
<div>
<table cellpadding="0" cellspacing="0" border="0" style="width: 100%; height: 100%;">
<tr>
<td>

<table cellpadding="0" cellspacing="0" border="0" style="width: 100%;">
<tr>
<td nowrap style="width: 800px; height: 60px; background-image: url(images/image1.jpg);"></td>
<td style="width: 100%; background-image: url(images/image1a.jpg);"> </td>
</tr>
</table>

</td>
</tr>
<tr valign="top" style="height: 100%; background-position: right bottom; background-image: url(images/image2.jpg); background-repeat: no-repeat;">
<td>
<asp:ContentPla ceHolder ID="ContentPlac eHolder1" runat="server"> </asp:ContentPlac eHolder>
</td>
</tr>
</table>
<div>
</form>
</body>

</html>
With the !DOCTYPE declaration in place, the second row of the table won't hold it's 100% height assignment. If I pull it, it's perfect.

Also, VS is complaining that the "nowrap" attribute is outdated and that I should use a newer contruct. Where can I find out what the appropriate newer construct is? If I leave out the "nowrap" then I end up losing the image all together.

Thanks.

Jerry
Feb 23 '06 #1
6 1371
You shoult use <div>-layers instead of tables

http://www.codeproject.com/aspnet/as...nglesignon.asp

Daniel Fisher(lennybac on) | Software Engineer | newtelligenceR AG
blog: <http://staff.newtellig ence.net/danielf/>
staff.newtellig ence.net/danielf | usergroup:
<http://www.vfl-niederrhein.net > vfl-niederrhein.net

_____

From: rl*****@newsgro ups.nospam [mailto:rl*****@ newsgroups.nosp am]
Posted At: Thursday, February 23, 2006 1:41 PM
Posted To: microsoft.publi c.dotnet.framew ork.aspnet
Conversation: Positioning with 2.0
Subject: Positioning with 2.0
I just installed VS 2005. Was working with 2003 and .Net 1.1. Trying
to get the feel for a master page and I'm having some issues. I'm
looking for a pretty basic setup. Standard header with an image, forced
to lower right of screen, in the content area. I had this working just
fine in 1.1, but the tags seem to behave quite differently in 2.0.

If I remove the !DOCTYPE element, I get what I want. Is it dangerous to
remove this? How can I acheive the effect I want using proper 2.0
stuff? Here's some code:

<%@ Master Language="VB" CodeFile="Maste rPage.master.vb "
Inherits="Maste rPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Welcom e To...</title>

</head>

<body style="backgrou nd-color: #006b58;">

<form id="form1" runat="server">

<div>

<table cellpadding="0" cellspacing="0" border="0" style="width:
100%; height: 100%;">

<tr>

<td>

<table cellpadding="0" cellspacing="0" border="0"
style="width: 100%;">

<tr>

<td nowrap style="width: 800px; height: 60px;
background-image: url(images/image1.jpg);"></td>

<td style="width: 100%; background-image:
url(images/image1a.jpg);"> </td>

</tr>

</table>

</td>

</tr>

<tr valign="top" style="height: 100%; background-position: right
bottom; background-image: url(images/image2.jpg); background-repeat:
no-repeat;">

<td>

<asp:ContentPla ceHolder ID="ContentPlac eHolder1"
runat="server"> </asp:ContentPlac eHolder>

</td>

</tr>

</table>

<div>

</form>

</body>

</html>

With the !DOCTYPE declaration in place, the second row of the table
won't hold it's 100% height assignment. If I pull it, it's perfect.

Also, VS is complaining that the "nowrap" attribute is outdated and that
I should use a newer contruct. Where can I find out what the
appropriate newer construct is? If I leave out the "nowrap" then I end
up losing the image all together.

Thanks.

Jerry


Feb 23 '06 #2
Well, okay... But that doesn't go very far towards answering my questions...
"Daniel Fisher(lennybac on)" <in**@removethi s-lennybacon.com> wrote in message news:001b01c638 83$50e3b790$140 1010a@moseisley ...
You shoult use <div>-layers instead of tables



http://www.codeproject.com/aspnet/as...nglesignon.asp



Daniel Fisher(lennybac on) | Software Engineer | newtelligence® AG
blog: staff.newtellig ence.net/danielf | usergroup: vfl-niederrhein.net
------------------------------------------------------------------------------

From: rl*****@newsgro ups.nospam [mailto:rl*****@ newsgroups.nosp am]
Posted At: Thursday, February 23, 2006 1:41 PM
Posted To: microsoft.publi c.dotnet.framew ork.aspnet
Conversation: Positioning with 2.0
Subject: Positioning with 2.0


I just installed VS 2005. Was working with 2003 and .Net 1.1. Trying to get the feel for a master page and I'm having some issues. I'm looking for a pretty basic setup. Standard header with an image, forced to lower right of screen, in the content area. I had this working just fine in 1.1, but the tags seem to behave quite differently in 2.0.



If I remove the !DOCTYPE element, I get what I want. Is it dangerous to remove this? How can I acheive the effect I want using proper 2.0 stuff? Here's some code:





<%@ Master Language="VB" CodeFile="Maste rPage.master.vb " Inherits="Maste rPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">

<html xmlns="http://www.w3.org/1999/xhtml" >



<head runat="server">

<title>Welcom e To...</title>

</head>

<body style="backgrou nd-color: #006b58;">

<form id="form1" runat="server">

<div>

<table cellpadding="0" cellspacing="0" border="0" style="width: 100%; height: 100%;">

<tr>

<td>



<table cellpadding="0" cellspacing="0" border="0" style="width: 100%;">

<tr>

<td nowrap style="width: 800px; height: 60px; background-image: url(images/image1.jpg);"></td>

<td style="width: 100%; background-image: url(images/image1a.jpg);"> </td>

</tr>

</table>



</td>

</tr>

<tr valign="top" style="height: 100%; background-position: right bottom; background-image: url(images/image2.jpg); background-repeat: no-repeat;">

<td>

<asp:ContentPla ceHolder ID="ContentPlac eHolder1" runat="server"> </asp:ContentPlac eHolder>

</td>

</tr>

</table>

<div>

</form>

</body>



</html>





With the !DOCTYPE declaration in place, the second row of the table won't hold it's 100% height assignment. If I pull it, it's perfect.



Also, VS is complaining that the "nowrap" attribute is outdated and that I should use a newer contruct. Where can I find out what the appropriate newer construct is? If I leave out the "nowrap" then I end up losing the image all together.



Thanks.



Jerry





Feb 23 '06 #3
Hi rlrcstr,

Does the difference you mentioned occur at design-time only in the VS 2005
ide's designview of the page? I think the output of the page at runtime
still should be correct. And for VS IDE it does change the design-time view
of the page because of this can make our manipulation on the page element
more convenient. e.g when two nested table have set the same width and
height, if the design view doesn't display some gap between the table's
borders, it'll be very difficult to choose either of them through mouse in
design-view.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Feb 24 '06 #4
In article <eG************ **@TK2MSFTNGP14 .phx.gbl>,
rl*****@newsgro ups.nospam writes
If I remove the !DOCTYPE element, I get what I want.* Is it dangerous
to remove this?
Depends what you mean by dangerous. As you have seen, there may be
differences in the way a browser renders a page, depending on the
doctype. This is somewhat bogus as the doctype should not be used for
this purpose, but it is, so you have to live with it.

Removing the doctype probably put your browser into Quirks mode, whereby
it emulates old (buggy) implementations . This is not a good idea. You
should be aiming for 100% valid XHTML and CSS.
* How can I acheive the effect I want using proper 2.0 stuff?


First read up on XHTML and CSS and learn to code it properly. Make
liberal use of the validators to make sure your code is valid. If you
stick to that, you should find that your pages will look fine in any
browser, and even degrade gracefully in older ones.

HTH

--
Alan Silver
(anything added below this line is nothing to do with me)
Mar 1 '06 #5
Thanks for the reply, Alan...

Actually, my code validates just fine using the XHTML validator, just that
the behavior is different with and without the DOCTYPE specification. But I
can't seem to figure out how to force a table row to take up the remaining
height of the screen when the DOCTYPE spec is there. using a style that
includes "height: 100%" works without the spec, but with the spec the height
collapses to the cell content height.

Is there some new way to specify this in XHTML? Thanks.

Jerry

"Alan Silver" <al*********@no spam.thanx.inva lid> wrote in message
news:c5******** ******@nospamth ankyou.spam...
In article <eG************ **@TK2MSFTNGP14 .phx.gbl>,
rl*****@newsgro ups.nospam writes
If I remove the !DOCTYPE element, I get what I want. Is it dangerous to
remove this?


Depends what you mean by dangerous. As you have seen, there may be
differences in the way a browser renders a page, depending on the doctype.
This is somewhat bogus as the doctype should not be used for this purpose,
but it is, so you have to live with it.

Removing the doctype probably put your browser into Quirks mode, whereby
it emulates old (buggy) implementations . This is not a good idea. You
should be aiming for 100% valid XHTML and CSS.
How can I acheive the effect I want using proper 2.0 stuff?


First read up on XHTML and CSS and learn to code it properly. Make liberal
use of the validators to make sure your code is valid. If you stick to
that, you should find that your pages will look fine in any browser, and
even degrade gracefully in older ones.

HTH

--
Alan Silver
(anything added below this line is nothing to do with me)

Mar 2 '06 #6
In article <uP************ *@TK2MSFTNGP12. phx.gbl>,
rl*****@newsgro ups.nospam writes
Thanks for the reply, Alan...

Actually, my code validates just fine using the XHTML validator, just that
the behavior is different with and without the DOCTYPE specification.
Yup, that's because some browsers (incorrectly) use the doctype (or lack
of) to decide which mode to use for rendering. Due to bugs in Netscape 4
and IE5, a lot of pages were written with a faulty box model rendering
in mind. Later browsers fixed that particular area of bugs, leaving a
lot of existing page now broken. Browser vendrs decided to have two
rendering modes, standards and quirks, with the latter being for
backwards compatibility for pages written with the bugs in mind.

For more on this, as well as a comprehensive list of what doctypes
trigger what rendering modes, see http://hsivonen.iki.fi/doctype/
But I
can't seem to figure out how to force a table row to take up the remaining
height of the screen when the DOCTYPE spec is there. using a style that
includes "height: 100%" works without the spec, but with the spec the height
collapses to the cell content height.
First, you can't *force* anything with browsers, you can only suggest.
They are largely free to ignore your suggestions!!
Is there some new way to specify this in XHTML? Thanks.
I don't think so. I think this was actually not valid even in HTML4, but
I could be wrong. You would be better asking this in an HTML or CSS
newsgroup, as you'll get a more definitive answer.

Try news:comp.infos ystems.www.authoring.html and
news:comp.infos ystems.www.authoring.stylesheets for more advice.

HTH
Jerry

"Alan Silver" <al*********@no spam.thanx.inva lid> wrote in message
news:c5******* *******@nospamt hankyou.spam...
In article <eG************ **@TK2MSFTNGP14 .phx.gbl>,
rl*****@newsgro ups.nospam writes
If I remove the !DOCTYPE element, I get what I want. Is it dangerous to
remove this?


Depends what you mean by dangerous. As you have seen, there may be
differences in the way a browser renders a page, depending on the doctype.
This is somewhat bogus as the doctype should not be used for this purpose,
but it is, so you have to live with it.

Removing the doctype probably put your browser into Quirks mode, whereby
it emulates old (buggy) implementations . This is not a good idea. You
should be aiming for 100% valid XHTML and CSS.
How can I acheive the effect I want using proper 2.0 stuff?


First read up on XHTML and CSS and learn to code it properly. Make liberal
use of the validators to make sure your code is valid. If you stick to
that, you should find that your pages will look fine in any browser, and
even degrade gracefully in older ones.

HTH

--
Alan Silver
(anything added below this line is nothing to do with me)



--
Alan Silver
(anything added below this line is nothing to do with me)
Mar 2 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
32035
by: Bryan R. Meyer | last post by:
Hello Everyone, The problem of browser resizing has become an issue for me. While redesigning my webpage, I set the left and right margins to be auto so that my content would be centered. However, there are images that I used absolute positioning in order to place them in the appropriate location on my page. When I do a browser resize,...
4
2692
by: Jane Withnolastname | last post by:
I am trying to re-work an old site by replacing the html with css. On the main page, I have a logo image which I needed centred on the initial screen. I found the solution here: http://www.wpdfd.com/editorial/wpd0103.htm#toptip (the second example) The problem is, under the image is a large table. But using the above positioning, now the...
14
2462
by: Harlan Messinger | last post by:
What am I not understanding about the definition of { position: absolute; }? "The box's position (and possibly size) is specified with the 'left', 'right', 'top', and 'bottom' properties. These properties specify offsets with respect to the box's containing block." Please take a look at http://gavelcade.com/abspos.html and help me...
6
2666
by: rajek | last post by:
I posted a similar question yesterday, but didn't get an answer that resolved the issue. (Thanks to those who tried though.) The background: I've read in books and online that if you have one element with "relative" positioning, such as a <div>, it creates a "positioning context" for element within it. E.g., if you have a <p> inside your...
11
2625
by: NS | last post by:
I am relativly new to css positioning and have a question regarding the display of a DHTML pop-up Here is the basic HTML I am using: <html> <head> <script language="JavaScript"> <!--
1
2795
by: Charles Harrison Caudill | last post by:
with tables there is a clean and algorithmic way to organize things, but with css which is, once you get it working, much cleaner, I have to tweak and patch and hope and pray and curse before things are positioned the way I want them. It *should* be easy to say: this goes on the left, this goes on the right, this goes in the center, all on...
2
2480
by: Rob R. Ainscough | last post by:
I'm slowly (very slowly) working my way thru the bizarre and sadistic world of control positioning in MultiViews (ASP 2.0). I came across this to help me explain (or attempt to anyway) why my web page controls were all over the place. "Ironically, absolute positioning is relative. Yes, you read that right. An absolutely positioned element...
4
2097
by: Alan Silver | last post by:
Hello, Having been a light reader of this ng for a few months now (after several years absence), I have noticed that absolute positioning seems to be considered a Very Bad Thing around here. Generally, when someone posts a question about a design that uses it, they are told not to. Now, in my ignorance, I don't see what's wrong with it,...
9
3377
by: Bill Norton | last post by:
I've been experimenting with floats, positioning and offsets (top, left, etc.) to see what happens when you mix the properties together. All this may be old news to most of you, but it was extremely helpful to me. The results are summarized in this chart. In all these tests I was using a single child element inside a containing block. (I hope...
6
2903
by: Mark | last post by:
hi, i'm trying to position something in the top right corner of a container, but i can't seem to figure out how to get it working. here's the html <div class='thumb'><a href='image.jpg'><img src='photos/thumbs/ bigsmile.jpg'></a><a class='del' href='?p=gallery&del=2'>x</a></div> where 'thumb' is my container, and 'del' should be aligned...
0
7693
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8117
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6275
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5498
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
2101
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
932
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.