2 replies [Last post]
css newbie
Offline
newbie
Michigan
Last seen: 11 years 5 weeks ago
Michigan
Timezone: GMT-4
Joined: 2006-10-25
Posts: 2
Points: 0

I am working on a new design for my website and am relatively new to this whole CSS "thing". My problem is that I am attempting to center a link at the bottom of my page but it refuses to center -- it stays aligned to the left. I have even attempted to enclose the link between these tags

(where .center is set to text-align: center;) but it still refuses to center. The link is supposed to take a visitor to the next page. I have tested it in IE and it works fine but it does not work in Firefox. I have now spent about 3 hours attempting to fix this myself but have not had any success. I have also attempted to find the answer with some internet searches, also without success. I'm sure it is a simple fix but I obviously have not figured it out. Somebody please help. I am extremely frustrated!!

Here is a link to the page with the problem http://briansplace.ynt1.com/newcss/index_brian.htm The part that will not center is the box at the bottom of the page that says, "Day 3".

Thanks in advance,
CSS newbie

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 7 years 7 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Text-align only works on

Text-align only works on inline elements. You've made that anchor display: block which means you need to use a block level centering method, ie adding margin: 0 auto to the anchor.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

css newbie
Offline
newbie
Michigan
Last seen: 11 years 5 weeks ago
Michigan
Timezone: GMT-4
Joined: 2006-10-25
Posts: 2
Points: 0

Wow. Many, many thanks. I

Wow. Many, many thanks. I never realized that. It definitely is a simple fix, but I never saw it.

Thanks again.
CSS newbie