- This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
Viewing 9 posts - 1 through 9 (of 9 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 I am again.
I cant understand: why is hovered div Join us soon is not a full link, but only the text? What am I missing?
PS is that ok, that I make div as a button or are there any issues with my “technique”?
Why make something that is not a button, a button, when you can just use the button.
The link you provided handles this very badly, in my opinion.
why is hovered div Join us soon is not a full link, but only the text? What am I missing?
Because there is a link inside the div
.
See:
<div class="join-button">
<a href="http://eyes.in.ua/glavnaya/">Join us soon</a>
</div>
I would have done something like this.
http://codepen.io/alenabdula/pen/Cmlsh
I’m going to side with Alen. You can style a button any way you please and it’s FAR more semantic. Only use divs when there’s no other HTML element that would be semantically appropriate.
You’re all wrong
;)
This is worth a read…
http://www.karlgroves.com/2013/05/14/links-are-not-buttons-neither-are-divs-and-spans/
So many headshots for the morning in Ukraine with you, guys.
Ok, lets consider that I am using SPAN (as it becomes available to link the whole area) and there are few moments still cant understand: why SPAN kills all my requirements in positioning of this block? Why cant I center it with a lovely “margin: 0 auto” ?
Because span
is an inline element which doesn’t react to margins.
…also the consensus is, i think, that span
is probably the worst way to go.
Thanks for advices.
gcyrillus
p and clearing are from wordpress templates… trying to figure out them.
Many simple and important things I’ve become to know.
p and clearing are from wordpress templates
As I recall, there is a setting in WP somewhere that stops everything getting wrapped in p
tags.
Oh! Thanks gonna find out where it is…