How would I get: initial to work at the top of the code?
Working code: Links at the top
I was told to ask in here because it involves a CSS answer, not javascript.
This specifically:
It would take some kind of CSS change to hide the initial image. I recommend that you get the advice of CSS people to find out the CSS changes to get that initial one to work, and whether it means adding another classname to it, or some other technique.
In the code you’ve posted, initiale is the div which wraps everything apart from the audio. In what way do you think it could be moved “to the top”?
Ah, not two dimensional, but three dimensional top. I don’t see any z-index rules, so I’m guessing it’s absolute position interfering. If you temporarily add outline: solid 1px #0AF;
to the initiale::before, initiale::after
does the outline show that to be over the click target?
@asasass: I see that you have once again edited you initial post, long after the discussion has moved on, to add significant information, despite the number of times you have been asked not to do that. You seem determined to make life as difficult as possible for those attempting to assist.
In your working code, initiale is a separate div which comes after the links div. In your non-working code, you have not moved initiale above links; you have used it as a wrapper for everything. I suggest you amend the HTML as a first step, and move the div to the top, if that’s what you want.
When editing a post, the question that must be asked is “How can anyone that’s already viewed my post, going to find out about the changes that I’m making?”
Most of the time people that are actively involved, cannot learn about the edits that you’ve made to a post. Because of that, it’s best to restrict edits to fixing the occasional spelling mistake. When you forget to add new information to a post, you really need to place that new information in a new post.
re poor naming: Well, I’m willing to confess. Been there, done that.
At the time I didn’t know any better and it “worked”. I didn’t have much trouble keeping things sorted when there was only a little of it and it was fresh in my mind. But for larger amounts and when I had been away from it for a while, I had to figure out all over again what it was I was doing. Fun, not.
I have since become a little bit better at choosing what names to have. And I have become a bit better at not writing code that isn’t needlessly bloated. I wouldn’t say my code is %100 DRY (Don’t Repeat Yourself) but I try my best. Especially when I catch myself repeating myself.
I would argue that it’s actually bad to keep your code 100% DRY, because it is only when you have two examples of repetition, preferably three, that you should seek to remove that repetition.
Except for the second having more specificity, they look the same to me in terms of being prone to problems.
I must disclose that my approach to HTML and CSS could be considered “minimalist”. I prefer to have only as much as needed and I’m easily satisfied way before any of my design efforts get anywhere near being “art”.
There are different ways of writing CSS to be sure. First I write the tag selectors. eg.
p { font-family: "Comic Sans MS", cursive, sans-serif; }
Then I try to have classes for “groups” of elements that have style properties in common with each other. eg.