i want to use vertical-align: middle; but i have seen it posted on other threads that it isnt supported by all or something. Could i get a little help on this. also, if it isnt supported what could i use? thxI don't know how well it's supported, but according to the W3C it only applies to inline and table-cell elements.
You can see here, at the Property Index (<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/propidx.html">http://www.w3.org/TR/REC-CSS2/propidx.html</a><!-- m -->), look down near the bottom.ok, thx. also could u tell me what are inline elements. Im still getting used to the terminology a little thx Inline elements are things like the STRONG, SPAN, and IMG elements. They go with the flow of the text; they will stack horizontally, you cannot legally apply width, height, padding, or margin to any of these elements. Block-level elements (like DIV and P) on the other hand, take up the entire width of their containing element; they stack vertically. That's why you have to float two DIVs to get them to sit next to each other.ok, cool thx. not sure how vertical-align would actually do anything w/ those though i just tryied using it w/ span and it didnt do anything like i thought >.< thx for the help, now to figure something else out Originally posted by pawky
ok, cool thx. not sure how vertical-align would actually do anything w/ those though i just tryied using it w/ span and it didnt do anything like i thought >.< thx for the help, now to figure something else out
Yeah, I've had sketchy support (okay, none at all) with VERTICAL-ALIGN, so I don't normally use it (can't remember the last time I did).
You can look here (<!-- m --><a class="postlink" href="http://www.w3.org/Style/CSS/Test/CSS1/current/test544.htm">http://www.w3.org/Style/CSS/Test/CSS1/c ... est544.htm</a><!-- m -->) to see some examples.
Here's sort of an example:
CSS:
p {
padding: 2em 0.5em;
text-align: center;
border: 1px solid #000;
}
p span {
vertical-align: super;
}
Code:
<p>This is a <span>paragraph</span>.</p>oh, ok. i guess i c now. what a pain though >.< they should have made it for block elements as well well, thx for the help ill c how i can use it alternatives I use include:
margins or padding if possible.
line-height if it's a one line thing to be vertically aligned, like a menu.
You can see here, at the Property Index (<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/propidx.html">http://www.w3.org/TR/REC-CSS2/propidx.html</a><!-- m -->), look down near the bottom.ok, thx. also could u tell me what are inline elements. Im still getting used to the terminology a little thx Inline elements are things like the STRONG, SPAN, and IMG elements. They go with the flow of the text; they will stack horizontally, you cannot legally apply width, height, padding, or margin to any of these elements. Block-level elements (like DIV and P) on the other hand, take up the entire width of their containing element; they stack vertically. That's why you have to float two DIVs to get them to sit next to each other.ok, cool thx. not sure how vertical-align would actually do anything w/ those though i just tryied using it w/ span and it didnt do anything like i thought >.< thx for the help, now to figure something else out Originally posted by pawky
ok, cool thx. not sure how vertical-align would actually do anything w/ those though i just tryied using it w/ span and it didnt do anything like i thought >.< thx for the help, now to figure something else out
Yeah, I've had sketchy support (okay, none at all) with VERTICAL-ALIGN, so I don't normally use it (can't remember the last time I did).
You can look here (<!-- m --><a class="postlink" href="http://www.w3.org/Style/CSS/Test/CSS1/current/test544.htm">http://www.w3.org/Style/CSS/Test/CSS1/c ... est544.htm</a><!-- m -->) to see some examples.
Here's sort of an example:
CSS:
p {
padding: 2em 0.5em;
text-align: center;
border: 1px solid #000;
}
p span {
vertical-align: super;
}
Code:
<p>This is a <span>paragraph</span>.</p>oh, ok. i guess i c now. what a pain though >.< they should have made it for block elements as well well, thx for the help ill c how i can use it alternatives I use include:
margins or padding if possible.
line-height if it's a one line thing to be vertically aligned, like a menu.