Where are the inline styles coming from?

New Contributor

My template file looks like this  

 

<div class="post-item">
                    {% if not simple_list_page %}

Then on the page, it loads like this

<div class="post-item" style="position: absolute; left: 389px; top: 0px;">
                    
                  "content content"

Where is that inline style coming from?

Reply
0 Upvotes
4 Replies
Resident Expert

>>Where is that inline style coming from?

 

Possibly from a css stylesheet?

- see Create, edit, and attach CSS files to style your site

Reply
0 Upvotes
New Contributor

Style sheets don't inject code into the html, that's the page source showing the inline styles.

 

 

Reply
0 Upvotes
Highlighted
Top Advisor

Hey @scohoe,

 

We need a little more information. Is this happening live on the page, the inline styling not existing in the template code at all?

 

If that is the case, and considering the css is positioning, I would say you have a rogue javascript file injecting the css based on some height or width calculations. 

 

If you share a shareable link I bet we can figure this out.

New Contributor

@Jsum Sure, what kind of shareable link would give more information?

 

The inline style does not exist in those template files, so I'm starting to wonder too about what js is injecting that, and why.

 

The page in question is something like this https://info.trustyoak.com/blog/author/caty-smart

Reply
0 Upvotes