473,503 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Visual Studio / DOCTYPE

Hi all,

My apologies for this post being perhaps slightly off topic, at work I am
only able to access MS newsgroups and I was under to find one perhaps more
appropriate.

My problem.....

Visual Studio defaults to having this DOCTYPE at the top of my web forms.

<!--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">-->

When I try to validate my pages via the W3C's html validator I get messages
about it not being HTML 4.0 Transitional etc...

What I found that seemed to make a difference was adding the URI to the end
of the statement - as below:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

Ok - so now I can validate via the W3C - marvellous...however - and this is
a bit odd...

In the "design" view of the page now, the text has all gone SUPER SMALL -
its tiny, images remain the correct size but all text goes tiny. Yet when I
run the page in IE its fine....alas if I run it in FireFox its tiny - I can
increase the text size etc, but this goesn't ever get it to where it should
be, as some of the text that is supposed to be smaller (copyright text etc)
ends up big just to make the normal text big?!

I checked out the W3C webby this morning to check I had the correct line for
the DOCTYPE, I managed to find this, which was different to what I had...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

(found on - <http://www.w3.org/TR/REC-html40/sgml/loosedtd.html>)

So, I've put that in, but still in Visual Studio and FireFox the page is
rediculously shrunk down - yet in IE it remains ok.

What I want is obviously to validate via the W3C standards, as well as have
the page working in as many browsers as possible (hence the W3C stuff!) - at
the same time it would be handy to resolve the issue in the design view...

If anyone has any info I would be greatful, and again, my apologies if
deemed OT...

Regards

Rob Meade
Nov 19 '05 #1
2 2270
"Rob Meade" <ku***************@edaem.bor> wrote in message news:uZ****************@TK2MSFTNGP14.phx.gbl...
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">

Ok - so now I can validate via the W3C - marvellous...however : : In the "design" view of the page now, the text has all gone SUPER SMALL - its tiny, images remain the correct size but all text
goes tiny.


Try adding a CSS style sheet. The DTD validates the structure of the
document and directs a browser's interpretation of the markup. The
CSS governs the styling and appearance of that markup.

In your <head> element, add something like:

<style type='text/css'>
a, p, span { font: 24pt sans-serif; }
</style>

The intent of this CSS makes text appearing in <a>, <p>, and <span>
tags a 24pt font. You'd adjust this font face/size to your requirements,
probably add other tags you wish to style, and/or qualify them to key
them to particular regions of your document (e.g., give those regions,
such as where the copyright text is placed, their own class attribute).
HTH,

Derek Harmon
Nov 19 '05 #2
"Derek Harmon" wrote ...
Try adding a CSS style sheet. The DTD validates the structure of the
document and directs a browser's interpretation of the markup. The
CSS governs the styling and appearance of that markup.

In your <head> element, add something like:

<style type='text/css'>
a, p, span { font: 24pt sans-serif; }
</style>

The intent of this CSS makes text appearing in <a>, <p>, and <span>
tags a 24pt font. You'd adjust this font face/size to your requirements,
probably add other tags you wish to style, and/or qualify them to key
them to particular regions of your document (e.g., give those regions,
such as where the copyright text is placed, their own class attribute).


Hi Derek,

Thank you for your reply.

I already have a style sheet included in my HEAD tag via <link
rel="stylesheet"... etc etc... it was pretty much the original one that VS
drops in each web app for you, but with a couple of changes - its contents
are below...as you can see (at the very bottom) I already have some classes
for the specific regions in question....not sure what browsers you may have
available but if you want to see exactly whats happening, the pages in
question is here:

http://82.45.33.175/BodyShop/Default.aspx
http://82.45.33.175/BodyShop/ImageRepository.aspx

(as I said, fine in IE though)..

Head section:

<HEAD>
<title>BodyShop</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<LINK href="Styles.css" type="text/css" rel="stylesheet">
</HEAD>

CSS content:

/* Default CSS Stylesheet for a new Web Application project */

BODY
{
BACKGROUND-COLOR: white;
FONT-FAMILY: Arial, Verdana, Helvetica, sans-serif;
FONT-SIZE: .6886em;
FONT-WEIGHT: normal;
LETTER-SPACING: normal;
TEXT-TRANSFORM: none;
WORD-SPACING: normal
}

H1, H2, H3, H4, H5, TH, THEAD, TFOOT
{
COLOR: #000000;
}
H1 {
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 2em;
font-weight: 700;
font-style: normal;
text-decoration: none;
word-spacing: normal;
letter-spacing: normal;
text-transform: none;
}

H2 {
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 1.75em;
font-weight: 700;
font-style: normal;
text-decoration: none;
word-spacing: normal;
letter-spacing: normal;
text-transform: none;
}

H3 {
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 1.58em;
font-weight: 500;
font-style: normal;
text-decoration: none;
word-spacing: normal;
letter-spacing: normal;
text-transform: none;
}

H4 {
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 1.33em;
font-weight: 700;
text-decoration: none;
word-spacing: normal;
letter-spacing: normal;
text-transform: none;
}

H5, DT {
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 1em;
font-weight: 700;
font-style: normal;
text-decoration: none;
word-spacing: normal;
letter-spacing: normal;
text-transform: none;
}

H6 {
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: .8em;
font-weight: 700;
font-style: normal;
text-decoration: none;
word-spacing: normal;
letter-spacing: normal;
text-transform: none;
}

TFOOT, THEAD {
font-size: 1em;
word-spacing: normal;
letter-spacing: normal;
text-transform: none;
font-family: Arial, Helvetica, sans-serif;
}

TH {
vertical-align: baseline;
font-size: 1em;
font-weight: bold;
word-spacing: normal;
letter-spacing: normal;
text-transform: none;
font-family: Arial, Helvetica, sans-serif;
}

TD {
FONT-FAMILY: Arial, Verdana, Helvetica, sans-serif;
FONT-SIZE: .6886em;
FONT-WEIGHT: normal;
LETTER-SPACING: normal;
TEXT-TRANSFORM: none;
WORD-SPACING: normal
}

A:link {
text-decoration: underline;
color: #0000FF;
}

A:visited {
text-decoration: underline;
color: #333399;
}
/*
A:active {
text-decoration: none;
color: #FF0000;
}
*/
A:hover {
text-decoration: none;
color: #FF0000;
}

SMALL {
font-size: .7em;
}

BIG {
font-size: 1.17em;
}

BLOCKQUOTE, PRE {
font-family: Courier New, monospace;
}
UL LI {
list-style-type: square ;
}

UL LI LI {
list-style-type: disc;
}

UL LI LI LI {
list-style-type: circle;
}

OL LI {
list-style-type: decimal;
}

OL OL LI {
list-style-type: lower-alpha;
}

OL OL OL LI {
list-style-type: lower-roman;
}

/*
IMG {
margin-top: 5px;
margin-left: 10px;
margin-right: 10px;
}

*/
..copyrightText
{
FONT-FAMILY: Arial, Verdana, Helvetica, sans-serif;
FONT-SIZE: .626em;
FONT-WEIGHT: normal;
LETTER-SPACING: normal;
TEXT-TRANSFORM: none;
WORD-SPACING: normal;
COLOR: #666666;
}

..headingText
{
FONT-FAMILY: Arial, Verdana, Helvetica, sans-serif;
FONT-SIZE: 1.0em;
FONT-WEIGHT: 700;
LETTER-SPACING: normal;
TEXT-TRANSFORM: none;
WORD-SPACING: normal;
COLOR: #000000;
}
Regards

Rob
Nov 19 '05 #3

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

Similar topics

10
1598
by: Sam | last post by:
we are running windows 2003 server. it has NET framework installed, but doesn't have Visual Studio etc. installed on it. i created a new sulotion/project on my development pc and FTP'd it up to our...
1
1630
by: Stephen Adam | last post by:
Hi there, I've just started a c# project at work where I cannot use Visual Studio. I am trying to pass variables from one form to another. When I try to create an instance of the sending class...
9
1590
by: Brian Lowe | last post by:
I'm using Visual Studio to build ASP.Net pages and I'm trying to be standards compliant by using XHTML. In my page I create valid XHTML such as: <ul> <li>first list item</li> <li>second list...
4
1608
by: Charts | last post by:
6/23/05 ..NET Development\Framework\dotnet.framework.aspnet Visual Studio 2005 Beta 2 project cannot work in IIS virtual directory I used Visual Studio 2005 Beta 2 to build a simple new...
1
6319
by: Nogusta123 | last post by:
Hi, I have had a lot of problems getting web pages, master pages and content pages to render in VS2005 design view the same as they would in Internet Explorer. I did a lot of looking on the...
1
2857
by: cnixuser | last post by:
Hello, I am having a problem that I believe is related to the way a stream reader object looks for a text file by default. What I am doing is using a StreamReader object to read the text of a text...
0
7074
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...
0
7273
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6982
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5572
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,...
1
5000
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...
0
4667
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3161
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.