lining things up

M

mcnewsxp

how can i get the lables to line up to the right:

<h3><a href="reports/details.html"><%=cw_leads_sent%></a>&nbsp;Leads
sent</h3>
<h3><a href="calls/calls.html"><%=cw_calls_made%></a>&nbsp;Calls made</h3>
<h3><a href="reports/sells.html"><%=cw_sales_made%></a>&nbsp;Sales made
</h3>


tia,
mcnewsxp
 
D

dorayme

"mcnewsxp said:
how can i get the lables to line up to the right:

<h3><a href="reports/details.html"><%=cw_leads_sent%></a>&nbsp;Leads
sent</h3>
<h3><a href="calls/calls.html"><%=cw_calls_made%></a>&nbsp;Calls made</h3>
<h3><a href="reports/sells.html"><%=cw_sales_made%></a>&nbsp;Sales made
</h3>

To line up three elements like

<div><a href="reports/details.html">Text</a></div>
<div><a href="calls/calls.html">Text</a></div>
<div><a href="reports/sells.html">Text</a></div>

you can use such as

div {display: inline; padding: 0 2em 0 2em;}

or

div {display: float: left; padding: 0 2em 0 2em;}

All depends on what quite you are doing.
 
M

mcnewsxp

dorayme said:
To line up three elements like

<div><a href="reports/details.html">Text</a></div>
<div><a href="calls/calls.html">Text</a></div>
<div><a href="reports/sells.html">Text</a></div>

you can use such as

div {display: inline; padding: 0 2em 0 2em;}

or

div {display: float: left; padding: 0 2em 0 2em;}

All depends on what quite you are doing.

--
those h3 elements are already within a CSSd div.
 
B

Beauregard T. Shagnasty

mcnewsxp said:
how can i get the lables to line up to the right:
............................... ^^^^^^^^^^^^^^^^^^^
<h3><a href="reports/details.html"><%=cw_leads_sent%></a>&nbsp;Leads
sent</h3>
<h3><a href="calls/calls.html"><%=cw_calls_made%></a>&nbsp;Calls made</h3>
<h3><a href="reports/sells.html"><%=cw_sales_made%></a>&nbsp;Sales made
</h3>

Highly unusual to want to align h3's to the right, but here ya go:

h3 { text-align: right; }
 
D

dorayme

"mcnewsxp said:
those h3 elements are already within a CSSd div.

It was an example. You can substitute h3 for my div in the above.
I used div instead of h3 because I suspect it is semantically
unwise to use three H3's in a row.
 
D

dorayme

Ben C said:
s/display: //

Thanks, yes, forgot to knock it off the paste!

div {float: left; padding: 0 2em 0 2em;}

To the OP: I have been trying to think of a semantic situation
where you could have three heading elements in a line (like you
wanted). No problem in having three heading elements in a line
where there is relevant content under each. But the above
solution would not work on the *heading elements* in that case!

You could do it by having three divs floated with heading
elements inside each (and paragraphs etc.), three headings would
naturally line up if you used same styling for each.

Floats are often a good choice because they can be styled a
little more flexibly, at least that is the case with horizontal
lists (there was an excellent post from some ears that pointed on
this point a while back).
 
B

Beauregard T. Shagnasty

dorayme said:
You could do it by having three divs floated with ...

Still not noticing the OP said,
"get the lables to line up to the right".
To me, that means:
.....................................Leads sent..|
.....................................Calls made..|
.....................................Sales made..|

Substitute spacing for those dots. I still agree that h3 is a poor
choice unless there is context between those headings, and that there
are h1 and h2 somewhere before. A URL to OP's best example would help.
 
D

dorayme

"Beauregard T. Shagnasty said:
Still not noticing the OP said,
"get the lables to line up to the right".
To me, that means:
....................................Leads sent..|
....................................Calls made..|
....................................Sales made..|

Substitute spacing for those dots. I still agree that h3 is a poor
choice unless there is context between those headings, and that there
are h1 and h2 somewhere before. A URL to OP's best example would help.

What would I do without you all? I would have to read carefully
every post. If OP just wants to the right, of course, either
float: right or text-align: right. Latter is as you said once in
earlier post! The words "line up" just sent me off chasing a
rabbit.

I have been distracted badly by my brand new project called A New
Theory of Inheritance (whereby every element inherits everything
but rejects the bits it does not like). I want this theory to
spread so widely and to be so easily understood that Mr. Korpela
will never ever need to say how little understood the notion of
inheritance is. I have some way to go but will keep you all
posted. No groaning now, B! <g>
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top