Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / November 2005

Tip: Looking for answers? Try searching our database.

VS2005 HTML Formatting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter D. Dunlap - 08 Nov 2005 00:04 GMT
Is there any way, when reformatting an HTML page (control-K control-D)
to have it NOT MOVE a specific tag?

In particular, I write the <TD> tag two different ways depending on
what's between them.

Normally I write:

<td>
   content
</td>

But if I've got images that need to be butted together, or sometimes
short stuff like &nbsp; I write

<td>content</td>

I'd like it to leave those tags as I write them, but it doesn't look
like there's an option for that.

  Pete Dunlap
Mikhail Arkhipov (Microsoft) - 08 Nov 2005 04:39 GMT
On 11/7/05 16:04, in article mmqvm1hk1pg03gcccqqauqdji98lgepi62@4ax.com,

> Is there any way, when reformatting an HTML page (control-K control-D)
> to have it NOT MOVE a specific tag?
[quoted text clipped - 17 lines]
>
>    Pete Dunlap

Try Tools | Options | Text Editor | HTML | Formatting and specify custom per
tag formatting.

However, visual rendering of

   <td>
       foo
   </td>

might br different from

<td>foo</td>

since, according to
http://www.w3.org/TR/html4/appendix/notes.html#notes-line-breaks

browsers should ignore line break after start tag and before end tag, but
not tabs and spaces.

Thanks
Mikhail Arkhipov (Microsoft)
-- This post is provided 'AS IS' with no warranties and confers no rights
Peter D. Dunlap - 08 Nov 2005 13:37 GMT
>On 11/7/05 16:04, in article mmqvm1hk1pg03gcccqqauqdji98lgepi62@4ax.com,
>
[quoted text clipped - 42 lines]
>Mikhail Arkhipov (Microsoft)
>-- This post is provided 'AS IS' with no warranties and confers no rights

Yes, I know the rendering is different between the two, which is why I
want to be able to do it either way.

In the custom tag formatting, there are various options as to where to
put in line breaks, indenting, etc.  But there is no option to say
leave it the way I typed it.
Mikhail Arkhipov (Microsoft) - 08 Nov 2005 16:57 GMT
On 11/8/05 5:37, in article kda1n19oeqkqet231cuippp6hae7qeu4il@4ax.com,

>> On 11/7/05 16:04, in article mmqvm1hk1pg03gcccqqauqdji98lgepi62@4ax.com,
>>
[quoted text clipped - 49 lines]
> put in line breaks, indenting, etc.  But there is no option to say
> leave it the way I typed it.

If possible, please send exact repro steps directly to me (remove online
from the address).

Thanks
Mikhail Arkhipov (Microsoft)
-- This post is provided 'AS IS' with no warranties and confers no rights
Peter D. Dunlap - 18 Nov 2005 14:10 GMT
>On 11/8/05 5:37, in article kda1n19oeqkqet231cuippp6hae7qeu4il@4ax.com,
>
[quoted text clipped - 58 lines]
>Mikhail Arkhipov (Microsoft)
>-- This post is provided 'AS IS' with no warranties and confers no rights

Actually I'm just avoiding the ctl-k ctl-d reformatting except when I
first create a page.  To reproduce simple enter

<table>
    <tr>
        <td>
            Indented stuff
        </td>
        <td>inline stuff</td>
    </tr>
</table>

When you do ^K^D I haven't found any setting which will allow both of
the TD sets to remain as they are, one or the other will change.

However, I've found that if I use asp:Table tags instead of html tags,
it renders the TD tags without any spaces or line breaks before or
after, so that solves the problem.  They're considerable more verbose
than html, and they want an ID on every table for some weird reason,
but I can indent them all the time and not have extra spaces pushed
into the layout.

Well, almost.  I have a fairly complicated layout that renders fine on
Firefox and Opera, but IE still shows with little gaps at the top of
the page and major misalignment at the bottom, but as I haven't
figured out why yet that may be unrelated.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.