- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 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.
Hi all,
there’s a piece of code I don’t understand. Here it is:
The problem is that if I move the additional style attributes from the line "<DIV class=anim style="margin-left:103px;color:white">TEST</DIV>" to the top (in the DIV.anim style) it stops working as it should (horizontally centered layers). Even if I add a "background-color" attribute to the DIV.anim style the anim layer jumps to the left. Why?????
Thank you ;)
It is absurd: even if I change the line:
into the line
the "anim" layer shifts to the left!!! :shock:
don’t know if its the answer your looking for, but you have ended your CSS list with double quotes instead of a semicolon.
might be as simple as that.
Thanks for your reply.
I removed the double quotes, but it didn’t resolved. So I removed the "left:103px;" and moved all the attributes to the top:
Now it works correctly, but I wonder why I had this strange behaviour:
– if attributes are all on the div.anim{…} line without the "left" tag….. all OK (I still don’t know why)
– if attributes are all on the div.anim{…} line with the "left" tag….. LEFT SHIFT
– if attributes aren’t all on the div.anim{…} line (some attributes defined directly in the div tag) and there is the "left" tag….. all OK <
Thanks for help