PDA

View Full Version : Help with terms, part duex...


Ben@WEBProp
07-02-2003, 06:03 PM
Ya, I know I ask alot of questions, but how else am I gonna learn?

I ran into some tag properties that I am unfamiliar with, and if anyone could define these for me and let me know if they are even necesary, or if they are depreciated, that would be great. Thanks!

1) In the <td> tag, I found a rowspan="17" and in another I found a colspan="2'. What do they mean?

2) <big></big>

3)<tr></tr> and <td></td>: I know what they do, but I have never heard a concrete definition of these tags.

4)in my <img> tag, can I define width and height in % instead of in px?

That should be all for now...but more to follow, probably.

Thanks!

-Ben

Ben@WEBProp
07-02-2003, 07:02 PM
I was right, here is another one...

5)A table's width is set to 75% (making it span 3/4 the page). In that table, a TD's width is set to 100%. Now will that TD span 100% of the page's size, or 100% of the table's size?

Roy Sinclair
07-02-2003, 07:50 PM
1) In the <td> tag, I found a rowspan="17" and in another I found a colspan="2'. What do they mean?

Each table is composed of one or more "columns" and one or more "rows".

A cell with a "rowspan" property will span multiple rows in the table (making a "taller" cell), the value is the number of rows that the cell will span. Subsequent rows in the table shouldn't include a <td></td> for that cell until the specified number of rows or the end of the table occurs.

A cell with a "colspan" property works like the "rowspan" except the columns are spanned instead and in that case you leave out the <td></td> declarations for the spanned column instead.

Note that a cell can be set up to span both columns and rows at the same time.

2) <big></big>

Tag supported in IE, NS 6 and Mozilla but not actually ever adopted by W3C in any version of HTML as a standard.

Use <span style="font-size: larger;"></span> or equivalent instead.

3)<tr></tr> and <td></td>: I know what they do, but I have never heard a concrete definition of these tags.

TR = Table row, defines the start and end of a row in a table.

TD = Table Data, defines the start and end of a cell in a table.

TH = Table Header, same as TD except styled as a Header.

4)in my <img> tag, can I define width and height in % instead of in px?

Yes.

5)A table's width is set to 75% (making it span 3/4 the page). In that table, a TD's width is set to 100%. Now will that TD span 100% of the page's size, or 100% of the table's size?

The width of anything set to a percentage is calculated according to the containing block element. So the cell in your question would be 100% of the table's width, not the page.

Ben@WEBProp
07-02-2003, 09:42 PM
Ok, thanks! I get it. But now, some more...

6)Can I use % to control just about anything? More specificly: font size? I figure that if I put everything in %, then the page will change with the user's resolution, enabling them to see the layout that I want them to see.

7)In a Javascript that I have, the line var sliderwidth="###px"
and var sliderwidth="###px", but I want them to be in % as well. When I enter in the % rather than px, my slideshow dissapears. How can I get it into %?

8)Is it ok to dissable the horizontal scrollbar in a frame if I set evrything in tables and to 100%? Then nothing should overflow, right? And if I do see and over flow for some reason, can I just keep the no horizontal bar and change it to like 95% without causing problems in other resolutions/browsers?

meow
07-02-2003, 10:07 PM
Hello! BIG was already in HTML 3.2. :D
http://www.w3.org/TR/html401/present/graphics.html#edef-BIG

Ben, use the backdoor to the spec. :)
http://www.w3.org/TR/html401/index/elements.html
http://www.w3.org/TR/html401/index/attributes.html

WDGs quick reference is still good.
http://www.htmlhelp.com/reference/html40/
Download the Windows Help file here:
http://www.htmlhelp.com/distribution/

Browser extensions and browser support.
http://www.blooberry.com/indexdot/html/tagindex/a.htm

FJbrian
07-05-2003, 06:39 AM
Originally posted by Ben@WEBProp
Ok, thanks! I get it. But now, some more...

6)Can I use % to control just about anything? More specificly: font size? I figure that if I put everything in %, then the page will change with the user's resolution, enabling them to see the layout that I want them to see.

Nope, welcome to HTML;)

pardicity3
07-05-2003, 06:50 AM
Originally posted by FJbrian
Nope, welcome to HTML;)

Well, technically you can. In CSS you can specify the font-size as a percent, though it doesn't work quite the way you want it to Ben. Instead of using the size of the page (and/or containing block) like a table would, % font-sizes are based on the current user setting. More exactly, they are based on the current size of 1em.

As for everything else, I can't really think of any element you couldn't specify widths and heights for in percentages. Except for the obvious inline elements that you can't specify any dimensions for in the first place.

brothercake
07-05-2003, 04:09 PM
yeah - you can specify everything in % if you want, including image dimensions and font sizes.

Ben@WEBProp
07-07-2003, 09:48 PM
Let me ask you this then...
If you can size EVERYTHING, does that include frames? If so, how would I do that? I have 3 framesets with the dimensions:

<frameset rows="124,*" framespacing="0" border="0" frameborder="0">
<frame name="banner" scrolling="no" noresize target="contents" src="banner.htm">
<frameset cols="204,*">
<frame name="Nav" target="main" src="nav.htm" scrolling="no" noresize>
<frame name="target" src="first.htm" scrolling="auto" noresize target="_self">
</frameset>

what is the "*" for? How do I transform these cols and rows into %?

Thanks-

Ben

meow
07-07-2003, 10:09 PM
In this case "*" means "the rest".
Just choose a percentage that seems to works. Try say 15% instead of 124 pixels and see how it fares. :)

http://www.htmlhelp.com/reference/html40/values.html#multilengths

Ben@WEBProp
07-07-2003, 10:12 PM
Is there a concrete mathematical # into % system that I can use? I know that it's part divided by the whole, but how do I find the total number to divide by?

meow
07-07-2003, 10:20 PM
Yopu can't. :confused:

Ben@WEBProp
07-07-2003, 10:24 PM
no...i don't get it...is the number I divide by is 1*, but I cant figure out what number * is! I know that it means the remainder of the page, but how many collums are in * exactly in a 1024 resolution?

Ben@WEBProp
07-07-2003, 10:38 PM
I think I got it figured out (roughly)...If someone could confirm that this is the most accurate way in which I could do this, that would be great...

Alright, so I don't know the total number of cols, so therefore I can't figure the % of the screen that 204 cols is equal to, right?
In order to figure the %, I took a ruler to the screen and measured as accuratley as I could the length of the frame (which came out to be 2 5/16ths inches). If the total width of the screen is 12 inches, then couldn't I figure the % of the screen to be 2 5/16ths divided by 12? That gives me 19.271%...so should I go
<frameset cols="19.271%,*">

OR

<framset cols="19.271%,80.729%">
????:confused:????

Is my way of measurement even somewhat useful, accurate??

Thanks...

-Ben

Nightfire
07-07-2003, 10:57 PM
Don't bother going so accurate, I don't even think html can do things like that.
<frameset cols="19%,*"> will do

Ben@WEBProp
07-07-2003, 11:26 PM
Would it be wiser to use a * or a % for the second amount?
Does my math make sense?

Thanks for all your help...you guys rawk!

-Ben

meow
07-08-2003, 03:18 PM
* I think because then the math doesn't matter. If you do x%,y% you must know exactly how the lengths are calculated in different browsers and might still get rounding errors. * gets you the rest, no matter what.