Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Going back to the top of the page

Reply
Thread Tools

Going back to the top of the page

 
 
Jani
Guest
Posts: n/a
 
      01-06-2009
On 6 Jan., 15:52, "Jonathan N. Little" <(E-Mail Removed)> wrote:
> Now to dump
> the empty A element... Simply do this:
>
> <body id="top">
> ...
> To the <a href=#top">top</a> of the page because I cannot find the
> "home" key!


or fill it with &nbsp; ?


 
Reply With Quote
 
 
 
 
Jonathan N. Little
Guest
Posts: n/a
 
      01-06-2009
Jani wrote:
> On 6 Jan., 15:52, "Jonathan N. Little" <(E-Mail Removed)> wrote:
>> Now to dump
>> the empty A element... Simply do this:
>>
>> <body id="top">
>> ...
>> To the <a href=#top">top</a> of the page because I cannot find the
>> "home" key!

>
> or fill it with &nbsp; ?
>
>


Missing the point entirely. Why add an empty element that serves no
purpose other than supply a anchor when toy can use an existing element
and create your anchor with an ID. That is like using empty <p></p> or
table rows for creating padding!

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
 
 
 
Jani
Guest
Posts: n/a
 
      01-06-2009
On 6 Jan., 21:43, "Jonathan N. Little" <(E-Mail Removed)> wrote:
> Jani wrote:
> > On 6 Jan., 15:52, "Jonathan N. Little" <(E-Mail Removed)> wrote:
> >> Now to dump
> >> the empty A element... Simply do this:

>
> >> <body id="top">
> >> ...
> >> To the <a href=#top">top</a> of the page because I cannot find the
> >> "home" key!

>
> > or fill it with &nbsp; ?

>
> Missing the point entirely. Why add an empty element that serves no
> purpose other than supply a anchor when toy can use an existing element
> and create your anchor with an ID. That is like using empty <p></p> or
> table rows for creating padding!


I remember this "era", when they used a small transparent gif 1x1 px
to achieve some effect. LOL
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      01-07-2009
On 06 Jan 2009, Jani <(E-Mail Removed)> wrote:

>> > or fill it with &nbsp; ?

>>
>> Missing the point entirely. Why add an empty element that serves no
>> purpose other than supply a anchor when toy can use an existing element
>> and create your anchor with an ID. That is like using empty <p></p> or
>> table rows for creating padding!

>
> I remember this "era", when they used a small transparent gif 1x1 px
> to achieve some effect. LOL


I still use that, and it _is_ necessary.

--
Neredbojias
http://www.neredbojias.org/
http://www.neredbojias.net/
The road to Heaven is paved with bad intentions.
 
Reply With Quote
 
Bergamot
Guest
Posts: n/a
 
      01-07-2009

Neredbojias wrote:
> On 06 Jan 2009, Jani <(E-Mail Removed)> wrote:
>
>> I remember this "era", when they used a small transparent gif 1x1 px
>> to achieve some effect. LOL

>
> I still use that, and it _is_ necessary.


If you find it necessary, you are probably doing something wrong, or at
least inefficiently. I haven't used spacer gifs for about 10 years now.

--
Berg
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      01-08-2009
On 07 Jan 2009, Bergamot <(E-Mail Removed)> wrote:

> Neredbojias wrote:
>> On 06 Jan 2009, Jani <(E-Mail Removed)> wrote:
>>
>>> I remember this "era", when they used a small transparent gif 1x1
>>> px to achieve some effect. LOL

>>
>> I still use that, and it _is_ necessary.

>
> If you find it necessary, you are probably doing something wrong, or
> at least inefficiently. I haven't used spacer gifs for about 10 years
> now.


Hah, I knew somebody would take the bait...

Not at all, Holmes. I'm not using it as a spacer gif but as the last
image in a container to "finalize" justification of the previous (last)
line of images. There is no other way to do that I'm aware of.

--
Neredbojias
http://www.neredbojias.org/
http://www.neredbojias.net/
The road to Heaven is paved with bad intentions.
 
Reply With Quote
 
Adrian
Guest
Posts: n/a
 
      01-09-2009
"Jonathan N. Little" <(E-Mail Removed)> wrote in message
news:7ea24$49637049$40cba7be$(E-Mail Removed)...
> Adrian wrote:
>>> Find. It's an illusion and the whole goal was pointless, but it's good
>>> that you can solve your problems outside this group (and don't wish to
>>> share your assumed solution with others that might have had the same
>>> problem).

>>
>> Since you asked in such a pleasant way
>>
>> This was the solution to the problem I had which you
>> might have taken to be a different problem to the
>> one I attempted to describe.
>>
>> ******************************************
>> <body .....>
>> <a name = "0"></a>

>
> While you *can* use an empty A element for an anchor, that is just soooooo
> last millennium! Use an ID attribute and forego the superfluous empty
> element.
>
> Now I keep seeing this thought the thread, you cannot have a digit for the
> leading character for an anchor identifier:
>
> http://www.w3.org/TR/html4/types.html#h-6.2
> Basic HTML data types
>
> So you could have it a "anchor0" or "top" may be simpler. Now to dump the
> empty A element... Simply do this:
>
> <body id="top">
> ...
> To the <a href=#top">top</a> of the page because I cannot find the "home"
> key!
>
>
> --
> Take care,
>
> Jonathan
> -------------------
> LITTLE WORKS STUDIO
> http://www.LittleWorksStudio.com


Thank you for your helpful response.
Much appreciated.

Adrian.


 
Reply With Quote
 
Jani
Guest
Posts: n/a
 
      01-10-2009
On 8 Jan., 10:11, Neredbojias <(E-Mail Removed)> wrote:
> On 07 Jan 2009, Bergamot <(E-Mail Removed)> wrote:
>
> > Neredbojias wrote:
> >> On 06 Jan 2009, Jani <(E-Mail Removed)> wrote:

>
> >>> I remember this "era", when they used a small transparent gif 1x1
> >>> px to achieve some effect. LOL

>
> >> I still use that, and it _is_ necessary.

>
> > If you find it necessary, you are probably doing something wrong, or
> > at least inefficiently. I haven't used spacer gifs for about 10 years
> > now.

>
> Hah, I knew somebody would take the bait...
>
> Not at all, Holmes. *I'm not using it as a spacer gif but as the last
> image in a container to "finalize" justification of the previous (last)
> line of images. *There is no other way to do that I'm aware of.
>
> --
> Neredbojiashttp://www.neredbojias.org/http://www.neredbojias.net/
> The road to Heaven is paved with bad intentions.


On http://www.youtube.com they use it at the moment. If you want to
save the logo on the top left - you get a 1x1 px gif:
http://s.ytimg.com/yt/img/pixel-vfl73.gif
 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      01-11-2009
On 10 Jan 2009, Jani <(E-Mail Removed)> wrote:

> On 8 Jan., 10:11, Neredbojias <(E-Mail Removed)> wrote:
>> Not at all, Holmes. *I'm not using it as a spacer gif but as the
>> last image in a container to "finalize" justification of the
>> previous (last) line of images. *There is no other way to do that
>> I'm aware of.
>>

> On http://www.youtube.com they use it at the moment. If you want to
> save the logo on the top left - you get a 1x1 px gif:
> http://s.ytimg.com/yt/img/pixel-vfl73.gif


I haven't looked but it sounds like Youtube is using it as a cover
(layer-over) for their logo image via css.

--
Neredbojias
http://www.neredbojias.org/
http://www.neredbojias.net/
The road to Heaven is paved with bad intentions.
 
Reply With Quote
 
Jani
Guest
Posts: n/a
 
      01-11-2009
On 11 Jan., 06:45, Neredbojias <(E-Mail Removed)> wrote:
> On 10 Jan 2009, Jani <(E-Mail Removed)> wrote:
>
> > On 8 Jan., 10:11, Neredbojias <(E-Mail Removed)> wrote:
> >> Not at all, Holmes. *I'm not using it as a spacer gif but as the
> >> last image in a container to "finalize" justification of the
> >> previous (last) line of images. *There is no other way to do that
> >> I'm aware of.

>
> > Onhttp://www.youtube.comthey use it at the moment. If you want to
> > save the logo on the top left - you get a 1x1 px gif:
> >http://s.ytimg.com/yt/img/pixel-vfl73.gif

>
> I haven't looked but it sounds like Youtube is using it as a cover
> (layer-over) for their logo image via css.


Yes, could be like that.

In the CSS file you find this: (and much more aswell)

#masthead .logo{
float: left;
display: block;
margin-top: 2px;
margin-bottom: 4px;
}
#masthead .logo img{
width: 84px;
height: 33px;
background: white url(http://s.ytimg.com/yt/img/master-vfl69326.gif)
no-repeat scroll 0 0;

The master-vfl69326.gif is a big gif with many logos, buttons, signs,
etc.
Then they cut I think from the top left { width: 84px; height:
33px; } ... the YouTube - logo.
And then it is placed { margin-top: 2px; margin-bottom: 4px; } to get
a little space in between the logo and the "container".

The source code of the page has this:
<div id="masthead">
<a href="/" onmousedown="urchinTracker('/Events/Header_3/
YouTubeLogo');" class="logo"><img src="http://s.ytimg.com/yt/img/pixel-
vfl73.gif" border="0" alt=""/></a>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefighters at the site of WTC7 "Move away the building is going to blow up, get back the building is going to blow up." Midex Python 24 05-07-2007 04:23 AM
going back to the top line in input file mahurshi@gmail.com C++ 2 11-12-2005 05:23 AM
Stop page going back to the top when submitting Mike Owen ASP .Net Web Controls 8 11-09-2005 01:40 AM
avoid a page going back to site after logging out nvv via DotNetMonster.com ASP .Net 2 01-27-2005 09:12 PM
Going back to calling page BillGatesFan ASP .Net 4 01-04-2005 12:46 AM



Advertisments