Visual Studio / DOCTYPE

R

Rob Meade

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
 
D

Derek Harmon

Rob Meade said:
<!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
 
R

Rob Meade

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top