The said:
Has it occurred to you that "pixel position" within an HTML
page is a useless concept?
But I'm thinking about absolute positioning.
That said, it would be nice to see an editor which knew
how to edit at least two things at once: the HTML page
proper, and a style sheet or set of style sheets associated
therewith, and update the HTML as the style sheets are
tweaked.
Ok, let me tell you about my day today.
Web Form for an e-commerce site. Working on validation for an ASP:Label for
a credit card number. There were 3 levels of validation. A required field
validation control to make sure they entered somthing. A regular
expression validation control to make sure that they entered a credit card
number in the rigth format ( each type, VISA, MC, etc has a certain
sequence, number of digits and leading numbers -- all VISAs start with 4,
e.g.) and then a label control that was written to by a codebehind method
with the standard algorithm to make sure that the whole cc number is valid.
In any instance, either none were visible or one was visible, and I wanted
them to show up in the same place on the right of the text input field.
ASP:Validation controls don't have a style attribute. You can put one in,
manually in the HTML code, but the problem is that if you manipulate it in
the editor it erases it! ( It also always removes formatting as far as the
code layout of the HTML in the aspx page -- so if you format the code for
easy reading, by putting carriage returns after attributes, it resets those
and strings it out 200, 300 characters to the right. And it also randomly
deletes event handlers from the Init method...which impacted me because I
use the codebehind to change the regular expressions when the user selects
a different credit card type...).
Anyway, after getting shot down using STYLE I decided to use the CssStyle
attribute which is an /official/ property of an ASP control. So I added a
STYLE block to the top and made some style elements for the controls. Each
control and the label were 70px wide. So I made one element have LEFT:
-70px and the other -140px. This way they would all align in the same
place.
Then, of course, in the editor, they all align on top of one another, so
selecting the ones on the bottom to make changes was well nigh
impossible....well, you can see where the time goes....