Jump to content

Text-Align: Right;


daddyalfie

Recommended Posts

I have been trying to make a portion at the end of a paragraph shift over to become right aligned with the right margin. For instance:

 

"A man goes to a shrink and tells him that no one talks to him. The doctor says, “Next.” (- Henny Youngman) (<-This being aligned with the right margin, as with a "right justify" tab on a typewriter.)

 

I have tried to use <span> and defining it in the CSS as text-align: right;

 

Any clever ideas?

 

Alfie

Edited by daddyalfie
Link to comment
Share on other sites

Have you tried a float?

 

Other than that, if you give me the rest of your page, I can try and play with it.

 

HMM! Interesting possibility! I had not considered that. I'll let you know of my results.

 

Thanks Andrea!

 

Alfie

 

PS. here is the page(s) in question. You may have to search a bit to find the area I am trying to fix in the text. There are quite a few instances where there are quotes of jokes, or just plain quotes, that have an origin referenced. I want the references to be "right justified". Make sense?

 

www.sunshine-magazine.org/2013/may-13.php (I shall check that link to see if it is accurate!)

 

Thanks!

 

Alfie

Edited by daddyalfie
Link to comment
Share on other sites

Hi all:

 

Andrea's suggestion worked! But thee are a few gremlins that I need to address.

 

I defined <span> in the CSS as float: right; and clear: both; It works for the most part but there are instances where the <p> margins get screwed up. I think I need to play with the "clear" attribute.

 

Check my results HERE

 

(While in there, check my customer's corny sense of humor!)

 

Thanks!

 

Alfie

Edited by daddyalfie
Link to comment
Share on other sites

I don't see the span tag addressed at all in your CSS and there's no inline styling applied to it in the HTML, either. The stuff inside the span tag appears to the right of the screen in the code, but that does not show up in the browser on the actual page.

 

I think the page would look better if you added some padding around the text, so it doesn't run so close to the outer edge of the wrapper.

 

As far as coding issues, I see the following:

 

There's an empty li tag in your list. (in both navigations)

Quotes inside HTML should be written as ", not "

In the Constant Care paragraph, your closing span tag is missing its closing bracket.

2 sets of empty p tags above your footer navigation.

Your you don't have an equal number of opening and closing divisions.

 

The validator shows over 154 errors.

 

Also - have you considered Wordpress? That would be ideal for something like this.

Link to comment
Share on other sites

Never mind - I found the span CSS.

 

I found most, if not all of the boo-bos you mentioned and you may have opened the HTLM within the span of about a half hour before I realized that I had forgotten to upload the edited CSS! :bash: Sorry!

 

The whole issue turned out to be in vain anyway, as the customer (My brother-in-law) changed his mind and wanted it back to the way it was! :bash:

 

The 154 errors bother me quite a bit as it used to have a perfect score, but that was several years ago. Thanks for pointing it out, and I shall certainly check it out!

 

P.S. I just used the HTML validator and 151 of those errors were "non SGML character number ###, in other words all my apostrophes and quotation marks! :bash: . Am I using the wrong character set or what?

 

Three issues are left that I believe I can deal with.

 

Happy spring!

 

Alfie

Edited by daddyalfie
Link to comment
Share on other sites

You quotes and apostrophes are copied and pasted.

 

- open quote

 

- closing quote

 

- apostrophe

 

They are slanted which is why I believe it was copied and pasted from some kind of document editor such as Word.

 

You can easily do a find and replace for each one of those.

 

Correct quote/apostrophe:

 

" - for open and closing quotes

 

' - for apostrophe

 

You will notice the correct ones are straight up/down and not slanted.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...