I'm having trouble getting rid of a "display:none !important" inline style code on my website, I don't know how to get rid of it, it's causing the linked item to not show any image, or have an active link. If anyone could please give me any advice it'd be great.
I didn't write the display:none inline style, it automatically shows up when I upload the site to my web server. When I open my html/css pages locally it works fine.
screenshot of list items 2nd imge in first row is where problem lies
inspect element code screenshot from chrome browser
You likely have some sort of Javascript modifying the html, or possibly any number of other issues. If you could post the full code, it would be helpful in answering your question, and I could edit my answer to reflect something more helpful provided more information.
You can try this code in jQuery :
$('img').attr('style', '');
Related
I downloaded some HTML Newsletter template, adjusted it for my needs, and when i send it, it shows the whole CSS code at the top of the email.
This is mostly happening in Outlook, on Gmail i don't see this problem but some other discrepancies (like buttons size etc.)
Please look up the screenshot to see exactly how it looks like exactly when email received please look up the screenshot
In addition, i read somewhere that CSS code should be moved from <head> tags to just after beginning of <body> tag, but the problem still persists
How do i solve this problem?
Thanks
PS: I put the example of the code below, but i had to cut it because it exceeds 30000 characters... so i don't know if it is working now
OK guys i found the solution.
This was downloaded newsletter template which has inline code but for some reason it has some embedded code which was not necessary to be there.
The CSS coed which was showing in email disappeared just after i erased it from the file, and template without this code part was working just perfectly.
So i would say this was some kind of putting unnecessary code from developer in HTML file... the reasons i don't really know, but now it works.
In addition, i downloaded some newsletter files in the past they had the same problem. CSS showing in top was mostly seen on outlook.
I appreciate very much your assistance. I would say this problem is solved.
I have this site
link
As you can see in the picture below ... go under footer text and not seen.
I tried to inspect the code to figure out where the problem but unfortunately I have not found ...
You can help me solve this problem please?
Thanks in advance!
I'm pretty sure this is not a css problem.
The reason I think this is the case is because some times the page loads and the page behaves fine. This inconsistent behavior can be caused because your javascript is not being told to execute only after all the DOM elements are being created.
make sure your javascript is being called in the footer of your site, or use document.ready(function(){}); to make sure your javascript is being executed after all the elements it is changing load. Otherwise the javascript will not find the right handles since they do not exist yet.
Check this resource for how to properly use javascript:
https://learn.jquery.com/using-jquery-core/document-ready/
Often when I inspect the HTML code of a site have difficulty in finding out what file is part of a specific DIV.
For example if you inspect a CMS that has many files and modules I can not tell exactly where it is that div or a script JS.
If we inspect the site to find a JS code but do not know where it belongs.
Look at the picture below
http://i60.tinypic.com/2njln9f.jpg
I hope you have understood what I mean.
If it's not clear I will return with more information
Thanks in advance!
Unfortunately,
From web-inspector, it is not possible.
Because the browser only receives the combined html output.
But, You will be able to see all the javascript functions which have executed due to your actions. You can view them one by one to figure out which method has caused the mischief.
I'm kind of new to using HTML/CSS for real, so this maybe a stupid question.
My problem is a persistent whitespace on top of the page. At first I thought it was something about margin or padding, as suggested by Google and StackOverflow, but as far as I can tell it was nothing of that. I narrowed it down to a piece of text that is being added right after the opening body tag.
Here's what I mean:
If my code on the file is (simplified, but this is enough to cause the effect):
<html><body><p>text</p></body></html>
When I open it in Chrome and use the developer tools to see the elements, it's like this:
<html><body>""<p>text</p></body></html>
If I delete the "" it renders flawlessly. Right now I have a couple of lines of Javascript to remove the "" from every page, but that's obviously not ideal.
Also worth of note is that if put no tags in the body, like this:
<html><body>text</body></html>
Then no "" is inserted.
Besides Chrome, I've tested on Firefox and IE9, same thing happens. What am I missing here?
Thank you.
Thanks. Your comments were great. I had no script, just bare HTML, but as Jon pointed out, it's dynamically generated. Once I realized what was involved (I admit I should have realized it sooner ...) it was easy to find the answer:
Django template inheritance breaks site layout
It's solved. Thanks again.
I have ben looking everywhere but I cant seem to find any good answer to this question.
I am loading a few items, first when page loads and then if the user wants to change language for example the divs are loaded dynamically again. In all browsers except IE this works fine. In IE the content is loaded BUT its css is completely lost. WHY? No clue? I have ben trying to load the css with the file I am loading without any result so now I am hoping for you guys!!
Please help
Like the above comments said, we'd need to see the code to get a better perspective of what's happening.
Just a thought. Have you gone through the debugging process with Console, this giving more information you could relay? Does the CSS work before the user changes? Is the CSS loaded in the header? And/or for debugging purposes have you seen if inline CSS works? (this would be better as a comment but I don't have that privilege yet). Good luck, and let us know.