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

Issues related to previewing and publishing your web site.
Post Reply
mac13
 
 
Posts: 53
Joined: Fri Jan 25, 2019 10:46 am

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

Post 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
User avatar
Pablo
 
Posts: 22472
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: html div is not where it should be

Post 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
User avatar
BaconFries
 
 
Posts: 5640
Joined: Thu Aug 16, 2007 7:32 pm

Re: html div is not where it should be

Post 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
mac13
 
 
Posts: 53
Joined: Fri Jan 25, 2019 10:46 am

Re: html div is not where it should be

Post 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?
User avatar
Pablo
 
Posts: 22472
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: html div is not where it should be

Post by Pablo »

Did you publish all files?
mac13
 
 
Posts: 53
Joined: Fri Jan 25, 2019 10:46 am

Re: html div is not where it should be

Post 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.
Post Reply