Need Help Aligning Content of Span Tags

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I am trying to create tabs inside the head tag of an otherwise
blank document. It looks like this:

I am having problems getting the "Tab 1" and "Tab 2" spans to align to
the bottom.

Can somebody tell me how this is done?


<object align="bottom">
<span id="dyn_tabs">
<span id="tabheader1" style="background-color: #A0CEF8;"
onmouseover="_DisplayTab(1);">Tab 1</span>
<span id="tabheader2" style="background-color: #A0CEF8;"
onmouseover="_DisplayTab(2);">Tab 2</span>

Re: Need Help Aligning Content of Span Tags

pbd22 wrote:
Quoted text here. Click to load it

Doesn't look like much to me (I don't actually see *anything*), but that
doesn't surprise me. If you had managed to "create tabs inside the head
tag", what would you suppose they'd look like? Where would we see them?
Would we need special glasses to do so?

Quoted text here. Click to load it

Of what?

Quoted text here. Click to load it

My friend, you need to start fresh and obtain an understanding of HTML.
There are many books and online tutorials available, but maybe you could
start with the HTML tutorials at /, especially /.

HTH. Good luck.

Re: Need Help Aligning Content of Span Tags

pbd22 wrote:
Quoted text here. Click to load it

You appear to fail to grasp the fundamentals concerning html. The only=20
thing that should belong inside the head element are meta-tags, link=20
elements and script elements. Style elements, too, but only if the style =

affects only that page (multi-page styles *should* be in an external CSS =

file). Oh, and the title element, too.

Placing the object element into the head will cause nearly every web=20
browser out there to ignore it, or to render it incorrectly. Place the=20
object inside the body element, where it belongs.

Also, why use an object element to contain span elements? The object=20
element is meant to bring in multimedia, such as flash files and other=20
*external* files that are meant to be embedded into the web page (in=20
fact,  images are *supposed* to be brought in via the object element,=20
but IE fails to do it correctly... which is why the img element is still =

part of the spec).

Now, if you are looking to create a tabbed interface, there are *much*=20
better ways of doing it; chiefly with div elements and css:

Also, I would strongly recommend a DOCTYPE at the head of your document, =

preferably HTML 4.01 Strict:
    " ">
(Reference: )
This will ensure that you have a *decent chance* of having most=20
formatting appear similar across most browsers, as it *should* move them =

out of quirks mode and into standards-compliance mode.

As a final note, it would also be a *good idea* to use the UTF-8=20
character set for your documents, because it has a much broader=20
character set than ISO-8859-1 (US ASCII) and you won=E2=80=99t have to re=
sort to=20
character codes ( /) to display the =

majority of special characters (=E2=80=9C&=E2=80=9D being the big excepti=
on... it *must*=20
be encoded as &amp; to prevent confusing the browser).

Simply open up each HTML file in Notepad, and80=9Csave as=E2=80=9D t=
he same file=20
name, but choose UTF-8 as the character encoding. Simply specifying=20
UTF-8 in the meta tags won=E2=80=99t be enough, you have to save the file=
s as=20
UTF-8 as well.

My return e-mail address is an automatically monitored spam honeypot.
Do not send e-mail there unless you wish to be reported as a spammer.
Please send all e-mail to my first name at my last name dot org, with
a subject-line of80=9CNEWSGROUP REPLY FOR NEO GESHEL=E2=80=9D (all u=

Site Timeline