Page 1 of 1

*** SOLVED *** html div is not where it should be

Posted: Sun Jan 23, 2022 1:48 pm
by mac13
Hi,
I put the html code as a 'div' where I would like it to be visible. It is an external html with share buttons. I used it as type 'use <div> to set position and size ...'. The preview is correct, but after publishing on the server the code lands at the top of the page and is not visible. Where did I go wrong?
Code description is: Share, code name: html2
https://wasowscy.net/index.html
https://wasowscy.net/wasowscy.net.wbs

I get code from: https://www.addtoany.com/buttons/for/website

Re: html div is not where it should be

Posted: Sun Jan 23, 2022 2:15 pm
by Pablo
There is no difference between the HTML for preview and the publish page.
In both cases the exact same files will be generated.
Did you publish all files?

If you share a project then please read this first:
viewtopic.php?f=10&t=82134

Re: html div is not where it should be

Posted: Sun Jan 23, 2022 2:42 pm
by BaconFries
I used it as type 'use <div> to set position and size ...
Viewing the source you have not set it correctly you have just used <div> which will not set any position or height
<div id="Html2"> note no position added to the div.
See the following image from
Adding HTML or Javascript to a web page
Correct setting
Use <div> to set position and size of the HTML
Image

Re: html div is not where it should be

Posted: Sun Jan 23, 2022 3:58 pm
by mac13
But this div position is set in css file:
#Html2
{
position: absolute;
left: 379px;
top: 761px;
width: 430px;
height: 123px;
z-index: 7;
}

So, why is it not working?

Re: html div is not where it should be

Posted: Sun Jan 23, 2022 4:20 pm
by Pablo
Did you publish all files?

Re: html div is not where it should be

Posted: Sun Jan 30, 2022 1:05 pm
by mac13
Not for the first time, it turned out that the reason for the differences I saw was the server cache. On the second day, despite the lack of movement on my part, the visibility of the page was the same as in the preview.
Pls close topic as solved.