- This topic is empty.
-
AuthorPosts
-
August 19, 2013 at 2:32 pm #147460
magician11
ParticipantHi there,
At the bottom of this page http://www.mynaturopathchristos.com/
I have 2 bits of info
1) copyright info
2) website creatorI’ve done it with
<div class="footer-info">
<div id="website-creator">Website created by <a href="http://www.golightlyplus.com">the team at Golightly+</a>
</div>
<div id="mnc-copyright">
© My Naturopath Christos 2013
</div>
</div>and CSS
`/* format footer area */
.footer-info {
width: 888px;
}website-creator {
float: right;
}`Is there a better way to do it? Should “footer-info” be an ID instead of a class as it is unique?
Something seems broken around there so just want to check the above first http://validator.w3.org/check?uri=http%3A%2F%2Fwww.mynaturopathchristos.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.3+http%3A%2F%2Fvalidator.w3.org%2Fservices
thank you,
AndrewAugust 19, 2013 at 8:01 pm #147476jurotek
ParticipantYou have div inside the p tag, which is not allowed, that’s why it does not validate. Use div with display inline block for each copyright and created by and float one left and the other right.
August 20, 2013 at 3:21 am #147506Paulie_D
MemberAlthough I agree about not using fixed widths, I don’t have a problem with extra divs…they are semantically neutral.
Any text though should be wrapped in Text tags ( p / span etc) otherwise it’s not really targetable directly so the solution above is a good one also although not as responsive if you wanted the paragraphs to stack at lower viewport widths.
http://codepen.io/Paulie-D/pen/mhxDB
The stacking can be done with a media query when required.
My preference is not to use IDs unless I have to so classes is preferable for selection if required.
August 20, 2013 at 4:49 am #147517Paulie_D
MemberOh, I agree that mobile first would have been optimal.
I prefer classes to p+p (or #footer p + p etc), it’s easier for me but I know it’s not the only option.
If I have 5 paragraphs it could get difficult but each to their own.
I’m not fussed about anyone looking at my HTML. It’s only going to be another developer doing so and at least if I have a class attached they know instantly where to look….but as I said, it’s a personal choice.
August 20, 2013 at 10:42 am #147591magician11
ParticipantThanks guys. I love the mobile first layout.
I’ve put that code in from @tomasz86 as I like minimal code too.
Something breaks though.. I’m guessing that’s because of some media query from the theme? Have a look again at http://www.mynaturopathchristos.com/ by resizing the page.
Also @tomasz86 I’m trying to get my head around all the different display values. To help me understand better, why did you choose display: table-cell over any other display value?
August 20, 2013 at 11:59 am #147604Paulie_D
MemberI should say that my preferred “positioning” method in these cases is ‘inline-block` rather than floats….I just picked the other way this time.
August 20, 2013 at 12:40 pm #147618magician11
ParticipantPerfect @tomasz86 works great.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.