61 replies [Last post]
Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

14 of them in fact! Shock

The new links page is now up and it appears to be time to address both the name tag and the ID on the dividers.

1. I don't know where to hang the name tag (used by the bottom logo)so that the page resets to the very top - I tried putting it on the body tag, but it didn't like that either Sad

2. In addition the ID on all the dividers is throwing this error

Line 254, Column 57: ID "PURPLINE" already defined.

purpline" alt="divider">

An "id" is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).

The ID is read by the tiny .js which makes the dividers "elastic".

3. In addition, the first link - Adelaide Bookstores - won't jump to it's heading spot until something else has been used. :?

As always, any help appreciated Smile

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 6 years 12 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

1. Your anchor tag named

1. Your anchor tag named 'top' seems fine where you have it, and works for me (FF).
2. Like the message says: an ID should be unique i.e. only one per page. Use a class if you need multiple identifiers with the same name.
3. When you target a page jump with href="#whatever", the target element should be marked up as name="whatever", not id="whatever".

Life's a b*tch and then you die!

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 10 hours 55 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9743
Points: 3822

First, the name attribute is

First, the name attribute is deprecated except for form controls. Use id.

The simplest method of bouncing to the top is to use the page's wrapper as the target as here. Another way is to use another element at or near the top as the target, as here.

Why aren't you using the <hr> element for your, um, horizontal rule?

The first entries on both lists fail to work initially. The mere act of opening the DOM inspector activates though. I didn't look, but are you using any javascript on those lists?

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

Hi RTB & Gary!! Re

Hi RTB Smile & Gary!! Smile

Re the name vs id. I thought I had been round that particular tree before but nonetheless, I did what I was told and changed them all and then nothing worked...so I changed them all back Smile (Ta for confirming that Gary)

My fault for not being explicit enough. The "top" works just fine where it is in both FF and IE - it just doesn't validate. I've got it in an 'a' tag and Vlad keeps telling me that

document type does not allow element "A" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag.

Which I understand perfectly well. In fact Wolfie tried to tell me some time ago and I puzzled till my head hurt then and I've sort of been conscious of it ever since.

My (perceived) problem is that if I send the user to the top, I want them to be reminded where they are. I want the banner to show. I don't want the top of the screen under the banner, or under the menu, or under the heading. I want the top to be at the top. Sad Perverse, I know, but there you are - or not as the case may be.

I shall ponder your links some more...but I don't think it helps Sad

Gary - thanks for explaining why the first item in each list worked once you had 'bounced' the page. I think I can live with that, can't I? After all, the user will probably scroll down a bit before trying the index.

HR - because ummm...I thought all the interesting bits had been deprecated. Size, colour etc. If I can have a perrrpul one I might use it - I even thought about using a border-bottom on the heading. In fact I'm still thinking about it because all the bits keep being pink instead of perrrpul.

Now #2 - how do I explain this folks?
ID is not an id or a class nor can I substitute as far as I'm aware.
It refers to this

function reflow() { var header = document.getElementById('header'); header.style.border = header.style.border; var loopbar = document.getElementById('loopbar'); loopbar.style.border = loopbar.style.border; var photo = document.getElementById('photo'); photo.style.border = photo.style.border; var purpline = document.getElementById('purpline'); purpline.style.border = purpline.style.border; } window.onload = reflow;

This is my entire and only js.

It acts on those 4 items to make them 'elastic'

Is Vlad telling me that I've said it once and once is enough? In other words having specified it the first time I use the purpline, do I have to specify it every time? I thought I would have to.

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Vicki try adding id="top" to

Vicki try adding id="top" to the html tag or body tag and see if that takes you to the very top of the page.

Inline elements i.e the anchor with name="top" fails on two counts firstly name is deprecated but that's been explained, ID must be used, and secondly you are not allowed to have inline elements as direct children of 'body' placing a suitable ID="top" on either 'body' or 'html' tags should work.

With HR elements you can apply a certain amount of styling (as with all elements) via CSS properties, you can width them with a percentage and auto align them (you will probably need to explicitly make them display:block) this should create the same effect as the script does, although not sure about the graphic, although would not an alternative of widthing the div and adding the graphic as background repeating slice along the x-axis not work? in fact will a HR element take a background? then you have the rule should plain text be viewed.

The re-used IDs are a problem that you can't get around, that script was probably not designed with a view that it would be used on multiple elements, using one of the js libraries such as jQuery would cope with that as you could easily convert to using classes, but either way I think it better if you lost the script altogether.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 6 years 12 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

kk5st wrote:First, the name

kk5st wrote:
First, the name attribute is deprecated except for form controls. Use id.

Smee's document is written in HTML 4.01 and if we check the specs for HTML 4.01 we find the following snippets (with references):

Quote:

HTML 4.01 Specification ( http://www.w3.org/TR/html401/ )

12 Links ( http://www.w3.org/TR/html401/struct/links.html )

12.2 The A element ( http://www.w3.org/TR/html401/struct/links.html#h-12.2 )

Attribute definitions:
name
This attribute names the current anchor so that it may be the destination of another link. The value of this attribute must be a unique anchor name. The scope of this name is the current document. Note that this attribute shares the same name space as the id attribute.

Each A element defines an anchor
1. The A element's content defines the position of the anchor.
2. The name attribute names the anchor so that it may be the destination of zero or more links (see also anchors with id).
3. The href attribute makes this anchor the source anchor of exactly one link.

12.2.3 Anchors with the id attribute
The id attribute may be used to create an anchor at the start tag of any element (including the A element).

Use id or name?
Authors should consider the following issues when deciding whether to use id or name for an anchor name:
1. The id attribute can act as more than just an anchor name (e.g., style sheet selector, processing identifier, etc.).
2. Some older user agents don't support anchors created with the id attribute.
3. The name attribute allows richer anchor names (with entities).

Because the above specs say: "The name attribute names the anchor so that it may be the destination of zero or more links", I prefer to use 'name' when creating a target for a link, even though 'id' will do the job too. To my mind it is more faithful to the specs, plus when I see a 'name' in my code I know exactly why I put it there. For these reasons I recommended using 'name', although perhaps I should have explained more fully. In my defence I couldn't sleep and was surfing the net to try and make myself even more tired.

As for being depreciated, if we move on to the specs for serving XHTML 1 as xml (not relevant in Smee's case), we find the following:

Quote:

4.10. The elements with 'id' and 'name' attributes ( http://www.w3.org/TR/xhtml1/#h-4.10 )

HTML 4 defined the name attribute for the elements a, applet, form, frame, iframe, img, and map. HTML 4 also introduced the id attribute. Both of these attributes are designed to be used as fragment identifiers.

In XML, fragment identifiers are of type ID, and there can only be a single attribute of type ID per element. Therefore, in XHTML 1.0 the id attribute is defined to be of type ID. In order to ensure that XHTML 1.0 documents are well-structured XML documents, XHTML 1.0 documents MUST use the id attribute when defining fragment identifiers on the elements listed above. See the HTML Compatibility Guidelines for information on ensuring such anchors are backward compatible when serving XHTML documents as media type text/html.

Note that in XHTML 1.0, the name attribute of these elements is formally deprecated, and will be removed in a subsequent version of XHTML.

If one reads this carefully, one can see that the 'name' attribute is only depreciated for the elements a, applet, form, frame, iframe, img, and map, which means that technically it can still be used to target other elements. Not that this really matters though, because Smee is using HTML 4.01 and most people who regularly use XHTML will simply stop using 'name' altogether just to be sure.

I say again, Smee: Your anchor tag named 'top' seems fine where you have it. [edit] except for the validation problem of not being contained in another element that is! [/edit]

Life's a b*tch and then you die!

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

Ohdearohdearohdear... Roy -

Ohdearohdearohdear...

Roy - you were right, it was fine where it was originally - it worked but Vlad doesn't like it, so I'll never get my 'ticks' Sad

Hugo wrote:
Vicki try adding id="top" to the html tag or body tag and see if that takes you to the very top of the page.

Ah well! Get this...
Body doesn't work with name OR id
Html works with id and NOT name - neither Vladidate.

Hugo and the HR - you've got more ideas than a cat has fleas, do you know that? I think I'm thinking.

Hugo wrote:
The re-used IDs are a problem that you can't get around,
.....but either way I think it better if you lost the script altogether.

NOooooooo!!! It was almost my first success! BC (b4 csscreator). It shrinks! It stretches! NOooooooo!!! Puleeeeez don't make me do it (sobbing hysterically!)

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 6 years 12 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Smee wrote:Roy - you were

Smee wrote:
Roy - you were right, it was fine where it was originally - it worked but Vlad doesn't like it, so I'll never get my 'ticks' Sad

No, the anchor element still needs to be the child of a block element because, as Hugo pointed out, an inline element cannot be the direct child of the body element. My point was that 'name' is NOT depreciated in HTML 4.01, nor is it depreciated in XHTML 1 for most elements. You still need to move your anchor inside a block element.

If I get time later today I'll try and get to the root of your other problems.

Life's a b*tch and then you die!

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Hm firstly apologies, Roy is

Hm firstly apologies, Roy is quite correct re the name attribute, I'm so used to never using it other than on form controls, in fact kicking my elephantine memory into gear, I recall a thread couple of years back where we debated the pros and cons of this very subject and at length.

Vicki how so does an id on the html tag not validate? I use fragments on html & body on a regular basis, also to the best of my knowledge any id is targetable so not sure why the body one doesn't work. I tend to always pull out a page name from the server path to file and I set that as a variable which I use to echo out a id on the html tag so all my pages have a unique identifier, I then - as at the moment - have a link in the footer that targets that html id and returns me to the top of the page quite happily.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

RTB wrote:You still need to

RTB wrote:
You still need to move your anchor inside a block element.

I think I finally understand - all the bits have come together - we just usually have to wait a while :rolleyes:

RTB wrote:
If I get time later today I'll try and get to the root of your other problems.

I'd appreciate that, but for now try and get some sleep! Or is it time to get up again? Smile

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

Hugo wrote:icki how so does

Hugo wrote:
Vicki how so does an id on the html tag not validate?

Weeeelll...I've got < html name="top"> and Vlad says

Line 3, Column 11: there is no attribute "NAME".

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

Vlad's entire complaint

Quote:
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 6 years 12 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Smee - if you're going to

Smee - if you're going to target an existing element then despite everything I said above, it's probably better to use an ID. Personally, and as I've said, I would use a named anchor so that you know what it's there for and don't inadvertently change an ID label whilst forgetting that it's a link target. Put the anchor inside a block element thus:

That said, I don't know why you can't target the 'container' ID if you want, as the others are suggesting.

Now, to save me time, tell me what your JavaScript does, because it makes no sense to my very limited JS knowledge.

Life's a b*tch and then you die!

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Smee wrote: Hugo and the HR

Smee wrote:

Hugo and the HR - you've got more ideas than a cat has fleas, do you know that? I think I'm thinking.

Hugo wrote:
The re-used IDs are a problem that you can't get around,
.....but either way I think it better if you lost the script altogether.

NOooooooo!!! It was almost my first success! BC (b4 csscreator). It shrinks! It stretches! NOooooooo!!! Puleeeeez don't make me do it (sobbing hysterically!)

Yeeeeees!

hr { width:60%; height:8px; margin:0 auto; background: url(/images/your-image.gif) repeat-x; } image slice = height of image by ~2 - 3px width

Works in Firefox and IE6, possibly not in some other browser but it's proof of concept, it stretches and shrinks.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Smee wrote: Quote:You have

Smee wrote:

Quote:
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the element to incorporate flash media in a Web page, see the FAQ item on valid flash.

Vicki your trying to use the name attribute on the html tag, only as an anchor attribute may that be used as I said earlier it's an ID if you wish to target a container or as Roy has said use the name attribute but on a anchor tag placed within a block level container.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

Thanks for that Roy - I

Thanks for that Roy - I shall give that a try next or maybe tomorrow - you just caught me about to sign off for the day.

RTB wrote:
Now, to save me time, tell me what your JavaScript does, because it makes no sense to my very limited JS knowledge.

Okaaaay...each pair equates to a page element that is a set width which suits the page at fullscreen.

var header = document.getElementById('header'); header.style.border = header.style.border;

Header is used for the banner because it had to be unique. The other items are the photo on the front page, the fancy 'loopbar' under the heading on each page and the divider on each page (if I'm using one of the long ones, I have some short ones that I don't apply the ID to - and before you say it ...'cos sometimes I want a long one Laughing out loud )

I have no idea what the second line does at all. I don't even see how it can work - but it does.

I got the code (and a lengthy explanation) from Michel Fortin's site He calls it a 'liquid image'

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

PS - Russ Weakley does it on

PS - Russ Weakley does it on MaxDesign too - it's in one of his overhead presentation things - but it wasn't as clear at the time (I was about a month into all this)

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

Hugo wrote:Works in Firefox

Hugo wrote:
Works in Firefox and IE6, possibly not in some other browser but it's proof of concept, it stretches and shrinks.

Aaaah! If I like it tomorrow then I will employ it on the Library and Links pages Smile I would really like it snug up under the heading too - are there any gaps? Smile

Howsumever - THAT is a minor, well maybe not so minor since it's all over 2 pages, part of the little script. It automagically (always wanted to use that word of Gary's) shrinks and expands the front page photo, loopbar and banner (header). see my reply to Roy above.

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

It may help to try and

It may help to try and clarify and perhaps simplify what are known as anchors

An anchor is literately as it's name implies an point at which is rooted to the spot. Anchors also serve to send you to another 'place' via the href attribute or if no href attribute but instead a name attribute they become the thing that you can target (the place to go to) via an anchor that does have reference through the href attribute to that place

An ID is not the same as a name

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

You beat me to it. I'm

You beat me to it. I'm pretty clear on anchors. It's elements and attributes I can never keep straight! Smile But it's always good to see it explained nice and simply - ta.

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

The purpose of that script

The purpose of that script is really for photos; photos have a fixed dimension and are not meant to be fluid or resize, if allowed to usually you will end up with messed up dimensions and pixalation.

Using this script for what is a graphic is not really necessary, a simple gif as in your divider may be repeated as a background quite happily and as a thin slice. using it as a background to an HR element( given that it works cross browsers) would mean that should CSS not load you have a horizontal rule in it's place, as you have things if images are turned off or fail you have nothing to show.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

"Danger Will

"Danger Will Robinson"

background: url(images/bgmarble.gif); repeat; oops!

Turn off images and you loose that text against the perpule background, add hex color to background should images fail or be turned off text will be readable aginst a white background:

#fff url(images/bgmarble.gif);

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 6 years 12 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Smee wrote:I got the code

Smee wrote:
I got the code (and a lengthy explanation) from Michel Fortin's site He calls it a 'liquid image'

No wonder I couldn't understand it - it doesn't do anything (under normal circumstances)! It's just an IE hack to force IE to re-evaluate the size of the item. I thought I was being a bit dense when I first looked at it Wink

Life's a b*tch and then you die!

davek7
davek7's picture
Offline
Enthusiast
Portland, Oregon
Last seen: 9 years 47 weeks ago
Portland, Oregon
Timezone: GMT-8
Joined: 2005-11-04
Posts: 172
Points: 1

Smee, I've noticed that your

Smee, I've noticed that your links turn your page into the link location. Sometimes it's better to add target="_blank" to your link so it opens in a separate window and then people still have your page in its own window.

wolfcry911
wolfcry911's picture
Offline
Guru
MA, USA
Last seen: 5 years 33 weeks ago
MA, USA
Timezone: GMT-5
Joined: 2004-09-01
Posts: 3224
Points: 237

davek7, that's not very

davek7, that's not very sound advice
You should rarely force new windows on users - it should be their option
http://www.456bereastreet.com/archive/200603/the_target_attribute_and_opening_new_windows/

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 10 hours 55 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9743
Points: 3822

@Roy: You are correct as

@Roy: You are correct as far as you went. These elements have 'name' as an attribute:
form*, and the form controls, button, textarea, select, input and object(as a form control)

applet This element is deprecated.

frame and iframe Not a part of any strict DTD.

img*

a

map

param and meta Special case of name/value pairs

* name = cdata [CI]
This attribute names the element so that it may be referred to from style sheets or scripts. Note. This attribute has been included for backwards compatibility. Applications should** use the id attribute to identify elements. [emphasis added]

** From rfc2119,

Quote:
3. SHOULD This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.

While not, strictly speaking, deprecated, its use is pretty much limited to a, map and form controls. No elements, other than the above list, have the name attribute. Myself, I use it only on form controls and the meta/param pairs.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 6 years 12 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

kk5st wrote:Myself, I use it

kk5st wrote:
Myself, I use it only on form controls and the meta/param pairs.

...and I only use it for anchors, which is why I was surprised when you contradicted me. However; this sort of discussion is the main strength of forums like this, where we can test and correct each other and improve everyone's understanding through thrashing out the details and dispelling the myths. Long live the forums Smile

Life's a b*tch and then you die!

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

My, my, you've all been

Shock My, my, you've all been busy bunnies while I've been in snoozeville Laughing out loud

And I've just lost an hour because we went to summer time overnight.

RTB wrote:
Put the anchor inside a block element thus:< a name="top">
That said, I don't know why you can't target the 'container' ID if you want, as the others are suggesting.

Hi Roy - Because I somehow had it in my head I had to put it inside the tag and couldn't figure out how to do it :blushing: It works and Vlad likes it tooooooo! thank you Smile

Hugo wrote:
#fff url(images/bgmarble.gif);

Done! I would also like the bgmarble to load before the pictures so that people aren't trying to read the black text on the purple body while the pictures load...or isn't it really of any consequence?

Hugo wrote:
The purpose of that script is really for photos; photos have a fixed dimension and are not meant to be fluid or resize, if allowed to usually you will end up with messed up dimensions and pixalation.

Weeeelll...the front page photo is not toooo bad. But...but...but...what about the loopbar? I need it for the loopbar.

Hugo wrote:
Using this script for what is a graphic is not really necessary, a simple gif as in your divider may be repeated as a background quite happily and as a thin slice.

Yesss! HR in place on the 1st underline in the links page! :thumbsup: now I just have to find a nice little gradient maker Smile

Oooooh! Things are getting better and better! And Vlad likes it too! Thanks guys! Mwah!

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

RTB wrote:No wonder I

RTB wrote:
No wonder I couldn't understand it - it doesn't do anything (under normal circumstances)! It's just an IE hack to force IE to re-evaluate the size of the item. I thought I was being a bit dense when I first looked at it Wink

Smile Tee-hee...no Roy...I obviously didn't know what it was doing or care how it did it - all I knew was that it made the front page photo and the loopbar behave when I resized and that was all I cared about Smile

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 6 years 12 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

kk5st wrote:@Roy: You are

kk5st wrote:
@Roy: You are correct as far as you went ... While not, strictly speaking, deprecated, its use is pretty much limited to a, map and form controls.

Gary - having just re-read your post, I feel the need to further thrash out the detail about the 'name' attribute in the interests of clarity. The explanation of the 'name' attribute that you cite is from the W3C spec for HTML4.01 forms, not anchor tags, which is where my citation came from as follows:

name "This attribute names the current anchor so that it may be the destination of another link."

As we are specifically talking about anchor tags in this thread, I just wanted to reiterate that the current specs for HTML4.01 do not in any way suggest or even hint at - strictly speaking or otherwise - the use of the 'name' attribute being depreciated for anchor tags. Furthermore the specs make it very clear that whilst the 'id' attribute can be used, the 'name' attribute is still the primary mechanism for naming anchor elements and that it has better backwards compatibility and the ability to include entities.

I certainly did not know as much about this subject before we started this thread, only that I was pretty sure that the use of 'name' for anchors was still current for HTML 4.01. As I only ever target anchors in this way (for reasons explained), that is all I was interested in prior to this thread.

Life's a b*tch and then you die!

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

as I commented earlier, we

Smile as I commented earlier, we have had this discussion in depth a while back (all of us!) oh all ye with memory's to rival a goldfish!

Off I go a thread hunting, back sometime around teatime!

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

It's a very very long

It's a very very long thread, and the interesting bits are somewhat at a tangent to the original question and fairly low down the page.

http://csscreator.com/node/9441

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 6 years 12 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Either I did not read or

Either I did not read or partake in that discussion, or my aging memory is getting worse than I thought [ waits with bated breath to find out ]. But if you did discuss the issue in depth, why then did you and Gary both think that 'name' was depreciated in the full, blanket sense of the word?

Life's a b*tch and then you die!

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Smee wrote: My, my, you've

Smee wrote:
Shock My, my, you've all been busy bunnies while I've been in snoozeville Laughing out loud

And I've just lost an hour because we went to summer time overnight.

Just gained one as we in blighty plunge into winter, after having no summer to speak of :mad:

Smee wrote:

Done! I would also like the bgmarble to load before the pictures so that people aren't trying to read the black text on the purple body while the pictures load...or isn't it really of any consequence?

Does not the background-color to the marble graphic sort that problem?

Smee wrote:

Weeeelll...the front page photo is not toooo bad. But...but...but...what about the loopbar? I need it for the loopbar.

Do you though? have you tried it without? try changing the id to a class in the markup and styles, how does it look?

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

roytheboy wrote:Either I did

roytheboy wrote:
Either I did not read or partake in that discussion, or my aging memory is getting worse than I thought [ waits with bated breath to find out ]

Bait that breath no longer oh ye of dismal recal, you did indeed partake in the thread (only once though I think) Smile

roytheboy wrote:
But if you did discuss the issue in depth, why then did you and Gary both think that 'name' was depreciated in the full, blanket sense of the word?

Oh don't ask awkward questions, clearly we er.. um... :shrug: I'm sure we arrived at the proper conclusion in the end.. didn't we?

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 6 years 12 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Oh my; I did indeed partake

Oh my; I did indeed partake in that 2005 thread; more than once. But I don't remember a single post of it! That's very worrying Sad

[subtly and deliberately wanders off topic...]

Gosh, isn't it nice to see the posts of 'the old gang' again Smile Whatever happened to the ladies? Oh what manic stupidity we used to display on Friday afternoons when intelligent discourse used to be overwhelmed by churlish humour and pointless threads about anything and everything other than useful issues. Those were the days.

...Sigh.

...Matron - can I have another buttered scone please?

...Can anyone smell pee in this corner of the room?

...PARP! Shock

Life's a b*tch and then you die!

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

Oi you lot! I'm getting

Oi you lot! I'm getting inundated here what with all those edits Smile

Hugo wrote:
Just gained one as we in blighty plunge into winter, after having no summer to speak of :mad:

Well the weather doesn't know it's summer here either - storms and lightening last night, blowy and "quite" cold all day today Sad

Hugo wrote:
Does not the background-color to the marble graphic sort that problem?

Yes! It does! Laughing out loud Will wonders never cease I ask myself.

Hugo wrote:
Do you though? have you tried it without? try changing the id to a class in the markup and styles, how does it look?

Like it might have gone in the wash. I don't trust it yet though. (You can be lucky sometimes Roy Smile)

This morning I tried to find a gradient maker (for the Links page HR remember? ) and they keep making nice gradients but wanting to give me 100 x 100 so when I reduce it I don't get a gradient. Sad

So then I tried to cut one from another image and ended up with more slices than your local bakery, none of which looked any good.

So now it's just a colour.

I want a nice rrrrounded one please.
Like the second one. I left it there for reference. I've tried recolouring it, but that doesn't seem to work either.

Why won't vertical-align: middle (or bottom) work on my dots?

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

smee wrote:Why won't

smee wrote:
Why won't vertical-align: middle (or bottom) work on my dots?

Coz it's not meant to, just coz it says vertical-align doesn't mean it does work on all things.

#lib3 li {
background: url(/images/silvpurpdot_2sm.jpg) no-repeat 0 50%;

Shorthand properties are best

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

roytheboy wrote:Oh my; I did

roytheboy wrote:
Oh my; I did indeed partake in that 2005 thread; more than once. But I don't remember a single post of it! That's very worrying Sad

It's nothing to worry about, I just happen to have that razor sharp memory belonging to one still in their first flush of youth and vigou..*cough*

roytheboy wrote:

[subtly and deliberately wanders off topic...]

but don't wander too far we don't want to have to come looking for you when you can't remember your way back Tongue

roytheboy wrote:

Gosh, isn't it nice to see the posts of 'the old gang' again Smile Whatever happened to the ladies? Oh what manic stupidity we used to display on Friday afternoons when intelligent discourse used to be overwhelmed by churlish humour and pointless threads about anything and everything other than useful issues. Those were the days.

...Sigh.

Ah the good ol days where did they go?, I'm designating cold wet miserable Sunday afternoons to replace fridays.

roytheboy wrote:

...Matron - can I have another buttered scone please?

...Can anyone smell pee in this corner of the room?

...PARP! Shock

*sigh* so that's what I've got to look forward to, was thinking of getting a new office chair but might actually get a bath chair instead just in preparation.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

Hugo wrote:Coz it's not

Hugo wrote:
Coz it's not meant to, just coz it says vertical-align doesn't mean it does work on all things.

Of course not! Silly Smee *slaps forehead* Why would anything in this crazy coding world do what it looks as though it would at first.

Ummm...what are the 0 and 50% meanings please?

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

That worked toooo! While

Shock That worked toooo! Smile

While we're on a roll then...I received a letter from the c'tee today...

Quote:
The Committee agreed, however, to look at the work you had done and were quite impressed by the amount of effort you have put into the project and the standard of the test web pages you have created so far.

Take a bow guys!! "quite impressed" Laughing out loud with the work I've done ROFL! If only they knew!

It then goes on to give 5 conditions (not committing to use it, has to be better that what they've got etc etc

But this is the bit I love...

"... continue working on the site to develop a working model to present...

Shock What do they think this is? A bowl of goldfish?

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 6 years 12 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Hugo wrote:roytheboy

Hugo wrote:
It's nothing to worry about, I just happen to have that razor sharp memory belonging to one still in their first flush of youth and vigou..*cough*
... *sigh* so that's what I've got to look forward to, was thinking of getting a new office chair but might actually get a bath chair instead just in preparation.

...says he who is a few months older then me, if I recall correctly. That said, I'm probably not recalling correctly. What was your name again? What has Smee got to do with this thread? Where's my potty?

PARP!

Life's a b*tch and then you die!

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 6 years 12 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Smee wrote:I received a

Smee wrote:
I received a letter from the c'tee today ... continue working on the site to develop a working model to present...

So what basis are you developing this site on, and who are the c'tee? ...I just wondered Smile

Life's a b*tch and then you die!

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

RTB wrote:...says he who is

RTB wrote:
...says he who is a few months older then me, if I recall correctly. That said, I'm probably not recalling correctly. What was your name again? What has Smee got to do with this thread? Where's my potty?

PARP!

It's this CSS stuff Roy! You've got to give it up, not only have you turned blue, it's affecting yer brain!

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

I have categorically refused

I have categorically refused to ever mention my age before! but I cant believe your younger, that would make you 37 years eleven months coz I'm barely 38 years two months

Smee :? who he? someone does keep interloping with questions, should we explain that the thread has officially been hijacked for the time honoured forum tradition of wibble.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

RTB wrote:So what basis are

RTB wrote:
So what basis are you developing this site on, and who are the c'tee? ...I just wondered Smile

Ah! The c'tee are The Powers That Be at the Mission. What basis? :ohdear: Back at the beginning of the year they asked what "skills" people had that they could volunteer. I said I was...ummm...computer literate Smile and that I would be happy to help out updating the website newsletter each month.

Then I started to use the 'view source' and nearly had a cardiac arrest. Worked out that really it needed an overhaul...one thing led to another...and here we all are!! Laughing out loud

The idea was that if I could get something working, I was happy to hand it over to them and still volunteer to do the monthly update.

Problem is they got burned by the person who did the original site and want to make sure that I don't want to retain some sort of control. I don't.

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

half a mo so the sea'tea is

x-posted with above

Half a mo so the sea'tea is happy for you to continue working on and on and on yet they make no promise to use this work? question: is this a freebee? I'm guessing it is, and if it is I would not spend a lot longer on it, get it to a working state and then tell them that the rest can be finished off once they have agreed that it's worth you bothering to continue i.e get them to commit to actually making use of your effort.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

Hugo wrote:Smee Puzzled who

Hugo wrote:
Smee Puzzled who he?

Yes, I noticed I didn't count in the 'ladies' appellation above. I think I'm still female even if I'm not in their class Tongue

Quote:
...someone does keep interloping with questions, should we explain that the thread has officially been hijacked for the time honoured forum tradition of wibble.

Oh, look...wibble away by all means! The OP is made of sterner stuff I tell you Laughing out loud

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile

roytheboy
roytheboy's picture
Offline
Guru
North Wales, UK
Last seen: 6 years 12 weeks ago
North Wales, UK
Timezone: GMT+1
Joined: 2004-09-18
Posts: 2233
Points: 41

Hugo wrote:coz I'm barely 38

Hugo wrote:
coz I'm barely 38 years two months

...you wish! :rolleyes:

Hugo wrote:
should we explain that the thread has officially been hijacked for the time honoured forum tradition of wibble.

I think she's probably got the general idea by now :thumbsup:

Life's a b*tch and then you die!

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Cool we'll wibble away

Cool :thumbsup: we'll wibble away thenI'm concerned though that this smee fella is getting trapped into one of those never ending freebee development jobs

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Smee
Smee's picture
Offline
Elder
Adelaide, Oz
Last seen: 2 years 17 weeks ago
Adelaide, Oz
Timezone: GMT+9.5
Joined: 2007-06-10
Posts: 1596
Points: 340

I shall leave you to wibble

I shall leave you to wibble on in a moment...it's pumpkin time again and I'm trying to make another gradient!

Hugo wrote:
Cool :thumbsup: we'll wibble away thenI'm concerned though that this smee fella is getting trapped into one of those never ending freebee development jobs

Yes, of course I am doing it as a freebie...honestly! Who in their right mind would pay me to this? Laughing out loud

There was a disturbing line in the letter tho' that went soething like... ' would require the introduction of additional pages and headings...' Shock

Eeerrrm - I think that's where I start putting the brakes on and tell them they now need a professional and a CMS - there's no way I can teach someone else to update the newsletter page :?

Mods and gurus – THANK YOU!
For your time, knowledge and experience so willingly and generously given.
Please come back tomorrow and sort us all out again Smile