- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Here is my test case: http://codepen.io/Angeles4four/pen/dMVZxd
Notice the copyright is over to the left? I’m trying to position it at the center. In my CSS I include the position property (center) which is why I can’t figure out why it is still sitting way over at the left.
Thanks for your attention.
In my CSS I include the position property (center)
When you read up on the CSS position
-property you will see that there are five possible values: static, relative, absolute, fixed
and inherit
.
You can center a block-level element with the margin-right
and margin-left
values set to auto
.
Fork of your demo Maybe not directly related to this, but another thing to keep in mind is trying to use HTML markup that is “as semantic as possible”, so always try to use valid HTML-elements, like p
-tags for paragraphs, for example. When consistently applied you will find a lot of the time you don’t need things like br
-tags to force line-breaks.
Thank-you @Atelierbram for sharing Coyier’s guide. And thanks for the advice on using paragraph tags instead of line breaks.