Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Cascading Style Sheets _ Position | Countdown clock

Posted by: newby_coder Jan 18 2021, 04:00 AM

Good day,

My countdown clock is "blocking" my h1 text.

very new at coding; will appreciate any help and advise.

regards,




Attached File(s)
Attached File  index.html ( 2.09k ) Number of downloads: 192
Attached File  style.css ( 3.33k ) Number of downloads: 192

Posted by: pandy Jan 18 2021, 01:21 PM

That's because you've positioned #countdown absolute relative the browser window. Remove that. #countdown need to be positioned somehow though so it creates a positioning context for the things you have positioned within it.

So remove absolute and the offset (commented out below) and add position: relative.

CODE

#countdown{
   ...
  /*  position: absolute; */
  /*     top: 0; bottom: 0; left: 0; right: 0; */
  position: relative;
}


Interesting with all four offset values set to 0. Is this a mistake or a neat trick I didn't know about? I would have said it's crazy, but it actually seems to center the box. Must play a little with that.

Posted by: pandy Jan 18 2021, 01:27 PM

QUOTE(pandy @ Jan 18 2021, 07:21 PM) *

Interesting with all four offset values set to 0. Is this a mistake or a neat trick I didn't know about? I would have said it's crazy, but it actually seems to center the box. Must play a little with that.


No, that doesn't work. Must have been something else then. Too bad. sad.gif

Posted by: newby_coder Jan 19 2021, 07:48 AM

Thank you very much.

"Interesting with all four offset values set to 0. Is this a mistake or a neat trick I didn't know about? I would have said it's crazy, but it actually seems to center the box. Must play a little with that."

I copied this from the web. I do not know enough to answer your question

Posted by: newby_coder Jan 19 2021, 08:01 AM

My positioning still seem to be off (please help)


Attached File(s)
Attached File  index.txt ( 2.1k ) Number of downloads: 176
Attached File  style.txt ( 3.33k ) Number of downloads: 171

Posted by: pandy Jan 19 2021, 10:16 AM

Got the text labels in place but where are those gradients supposed to be? Are they placed correctly in the example in your first post?

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)