[css] align to top

R

Rafal 'Raf256' Maj

Hi,
how can I using CSS align text in each <td> to be top-right ?

Right I can have using text-align: top but how to align verticaly?

Btw. why this property is name TEXT-align, while it aligns not only
text, but all content (including <img> <div> <span> etc) ?
 
S

Steve Pugh

Rafal 'Raf256' Maj said:
how can I using CSS align text in each <td> to be top-right ?

vertical-align: top;
text-align: right;
Right I can have using text-align: top

No such thing.
See http://www.w3.org/TR/CSS2/text.html#propdef-text-align
Value: left | right | center | justify | said:
but how to align verticaly?

by using vertical-align. said:
Btw. why this property is name TEXT-align, while it aligns not only
text, but all content (including <img> <div> <span> etc) ?

Some browsers are buggy. It should only align inline content (so <img>
is aligned) not child blocks, though it will align the content of
those child blocks. See the above URI.

Steve
 
Joined
Oct 29, 2009
Messages
1
Reaction score
0
Need some assistance with CSS alignment

Hello,
I require some assistance with regards to alignment. That is similar to the above post.

The Requirement:
I need to have my h6 heading and my p paragraph, inline and top aligned. Also the paragraph should not wrap around the h6 heading.
Please refer to the applicable sample HTML code and the CSS I applied to the HTML to present the HTML below.

The HTML code:
<code>
<h6> par 31. </h6>
<p> The contents of the applicable paragraph, that relatest the h6 heading, that I would like to have side be side and vertical-align: top with the h6 heading </p>
</code>

The CSS code: (to align the above the HTML)

h6 { float: left; }

p { padding-left: 4em; }

My Solution is not perfect because...
I need the h6 heading to be "vertical-align: top" to be inline with the first line of the paragraph (p), but the vertical-align:top does not work on h6 float left.
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top