Relative position of H1

  • Thread starter Michael Laplante
  • Start date
M

Michael Laplante

Joel Shepherd said:
"Michael Laplante" <[email protected]> wrote:
The point, I believe, is that trying to fix page width (as it appears in
a browser) is about as likely to succeed as trying to fit just as much
text on the page as can be read in two minutes.

A web page conveys many things -- information, entertainment, forms for
input, etc.

The conveyer of that information has decide the best way to get it across.
That may involve graphics, fonts sizes and types, colours, layout. . . It's
the writer / web page designer's role to get their message across. (This
thread demonstrates this very point.) It's nice to give the user a choice
about how to configure the medium, but at some point the designer has to
take charge. Otherwise, that thinking simply leads to lazy design -- the
idea, "Oh well, I'll do this and let THEM figure it out" or "I won't put any
effort into this thing because viewers will only muck it up anyway with
their personal preferences." At some point, tastefully minimalist starts to
look a lot like boring and lacking imagination. (See any one of the dreary
one/two column centred, 80%-wide, CSS only sites that are springing up
everywhere. Wastes screen real estate and looks no better than a table
layout anyway. Why bother?)

Kinda like throwing a dictionary at someone with the idea "everything I need
to say is in there, look it up yourself. . ."

BTW, check out csszengarden.com. Shows the power and beauty of imaginative,
well-designed CSS. You'll see many of those designs demand the user have a
minimum width browser.
Hmm ... Also, in reading your original post, I'm having a hard time
distinguishing what you mean by a 'banner' for an H1.

I'm using H1 as if it were a banner for a blog-type site. As I've mentioned,
I'm new to CSS so am starting simply using HTML elements.

M
 
J

Jukka K. Korpela

Michael Laplante said:
It's
nice to give the user a choice about how to configure the medium,
but at some point the designer has to take charge. - -
As I've
mentioned, I'm new to CSS so am starting simply using HTML
elements.

Well, you mentioned you're "newbie" or "novice" in general.
Then you are surely going to the wrong direction if you are (as it
seems) actually trying to use HTML for layout just because you haven't
learned CSS yet.

Somewhat paradoxically, you admit and exhibit that you are a novice and
a newbie in web authoring, yet have a quite firm opinions on it.
This isn't uncommon though; and it's curable. But you need to
understand that you need to go backwards now. Backtrack to the point
where you thought you know how to author pages.
 
M

Michael Laplante

Jukka K. Korpela said:
"Michael Laplante" <[email protected]> wrote:
Well, you mentioned you're "newbie" or "novice" in general.
Then you are surely going to the wrong direction if you are (as it
seems) actually trying to use HTML for layout just because you haven't
learned CSS yet.

Somewhat paradoxically, you admit and exhibit that you are a novice and
a newbie in web authoring, yet have a quite firm opinions on it.
This isn't uncommon though; and it's curable. But you need to
understand that you need to go backwards now. Backtrack to the point
where you thought you know how to author pages.

Newbies have firm opinions. Web page authors should backtrack to where they
thought they knew about paradoxes. Otherwise, the direction is uncommon.
HTML is curable through CSS, but for layout this is wrong. As a novice I
will, in general, exhibit that learning is surely backward in general.

Did I get it right?

:)
 
A

Andy Dingley

Sorry to be dense but why does one then have to put that address in the
doctype?

Because it's SGML tradition to do so, and HTML grew out of SGML. In
the SGML world, the parser may indeed use it to go and fetch the DTD.
This behaviour - and similarly for modern XML - is sensible. The
application otherwise has no idea what format the incoming document is
in. The parser may be configured to validate on loading the document
(in which case the DTD will be retrieved) or simply to load any
well-formed document.

The fundamental difference between { SGML / XML } and HTML is that
SGML is a framework for building a family of possible formats, whereas
HTML is limited to a single (or handful of) pre-defined format.

For HTML, there are only a small number of "well-known" DTDs that the
browser may already have stored internally. Or more likely (and how
they actually do it) they recognise a handful of "known" DTD and
recognition causes the HTML parser/renderer to switch from its default
hard-coded behaviour into a slightly better-behaved hard-coded
behaviour.
What would happen if I put any old URL in its place?

Same as if you edit your HTML with a late '90s WYSIWYG editor, one of
those that used their own notions of "enhanced" DTDs and associated
doctype. Although the content may _be_ valid HTML 4.01, the browser
can no longer recognise it as such. It must now treat it as the
default of random unlabelled tag soup.
 
W

William Hamby

What I'm trying to do:
Set up an 800pixel wide "banner" for H1. It would look something like this:

____________________________________________________________
Title has an indent of 16 px
____________________________________________________________
<- 800 px wide ->

However, the ENTIRE element must be aligned in the middle of the page
(relative) to allow for browsers set to greater than 800 x 600.

I've got everything down, except for the relative positioning part. Can't
find it by googling -- all tutorials I've found refer to placing the TEXT in
the centre but that's not what I want to accomplish. The text would still be
indented from the left-edge of the banner but the entire banner would be in
the middle of the page. Hopefully, I've explained myself clearly. . .

M

body {text-align:center;}
div#document {margin:0 auto;}
div#banner {width:784px;} /* 800px - 16px padding for H1 below */
h1 {padding-left:16px;}
 
T

Toby Inkster

Andy said:
Although the content may _be_ valid HTML 4.01, the browser
can no longer recognise it as such. It must now treat it as the
default of random unlabelled tag soup.

Actually, if you use a custom doctype, browsers will typically switch into
standards mode. I guess they figure that if you're using a custom doctype,
you probably know what you're doing.
 
A

Andy Dingley

Actually, if you use a custom doctype, browsers will typically switch into
standards mode.

Why? The editors I'm thinking of were typically 3.2 / pre-CSS code
generators (HotDog springs to mind). They pretty much were "tag soup",
so standards-based rendering isn't a good idea anyway.

Have you got an example of a browser and doctype combination that
demonstrate this?
 
S

Steve Pugh

Andy Dingley said:
Why? The editors I'm thinking of were typically 3.2 / pre-CSS code
generators (HotDog springs to mind). They pretty much were "tag soup",
so standards-based rendering isn't a good idea anyway.

That's true. But the browser manufacturers seem to be taking the line
that if someone knows enough to use a custom DTD they probably know
enough to be using standards mode.
Have you got an example of a browser and doctype combination that
demonstrate this?

http://www.mozilla.org/docs/web-developer/quirks/doctypes.html

Note that several DTDs used by authoring tools are in the list of
those that trigger quirks mode.

Steve
 
T

Toby Inkster

Andy said:
Have you got an example of a browser and doctype combination that
demonstrate this?

Gecko: http://www.mozilla.org/docs/web-developer/quirks/doctypes.html
| The following trigger full standards mode:
| [...]
| * Any "DOCTYPE HTML SYSTEM" as opposed to "DOCTYPE HTML PUBLIC"
| [...]
| * Any unknown doctype

IE: http://msdn.microsoft.com/library/en-us/dnie60/html/cssenhancements.asp#cssenhancements_topic2
| The following table shows which values of the !DOCTYPE declaration
| switch on standards-compliant mode with Internet Explorer 6 or later.
| [...]
| Label URL present URL not present
| [...]
| Unrecognized !DOCTYPE On On
| [...]
| To allow for the creation of new DTDs, such as HiDad 11.22,
| standards-compliant mode is switched on when the !DOCTYPE declaration is
| not recognized.

Opera: http://www.opera.com/docs/specs/doctype/
| Opera 7 uses the same set of rules as IE6 for Windows to determine
| whether to enter Standards Mode or Quirks Mode.

Konqueror's (and thus Safari's) quirks mode is poorly documented, but
mostly seems to work like Mozilla's.
 
S

Steve Pugh

Andy Dingley said:
Of that list, I can't see any that I'd regard as "editor specific
doctypes" which switch it to _standards_ mode. Quite a few go the
other way into quirkiness though, which is what I'd expect.

Isn't that what I said?

In general a custom DTD _will_ trigger standards mode.
"The following trigger full standards mode:
[...]
Any unknown doctype"

Which, AFAICT, is what Toby was talking about.

A few _known_ editor specific ones do trigger quirks mode.

Steve
 
C

Cynthia Turcotte

Steve said:
Of that list, I can't see any that I'd regard as "editor specific
doctypes" which switch it to _standards_ mode. Quite a few go the
other way into quirkiness though, which is what I'd expect.

Isn't that what I said?

In general a custom DTD _will_ trigger standards mode.
"The following trigger full standards mode:
[...]
Any unknown doctype"

Which, AFAICT, is what Toby was talking about.

A few _known_ editor specific ones do trigger quirks mode.

Steve
 
A

Andy Dingley

Any unknown doctype"

Which, AFAICT, is what Toby was talking about.

Ah, I see. I was reading 'Any "DOCTYPE HTML SYSTEM"' as their
definition of "unknown doctype" (that triggers standards mode) which
would exclude the old editor-specific ones

However I was mis-reading
'Any unknown doctype, which should include the following
(technically known) doctypes:'
as requiring it to be _only_ one of that list, rather than a set of
unknown doctypes that _also_ included that list.
 

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

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top