简体   繁体   中英

Page Title loading before css

I'm experiencing a glitch on page load.

The title is loading first its starts on the left hand side of the page(my site is centered) and then moves to the correct position once the page is fully loaded. Please refresh a couple of times to see what i'm referring to.

I tried to use inline styles to make it start correctly but its not working -- i'm using an ERP system netsuite which is one of the reasons why i'm having trouble.

Any ideas on how i can fix this?

在此处输入图片说明

CSS arranges everything before and Javascript loads. Your Javascript fixes the display AFTER the page is loaded and displayed, so you need to fix your CSS

It appears that in your HTML you have set for the DIV containing "40% off Gluten-Free Lunches and Snacks" has it's margins defined there as 0px, which would make it not centered.

Line 247 when you view source in your HTML:

<div id='div__body' style="margin: 0px; margin-top: 3px;">

This overrides any CSS you have in your CSS files. You need to change that to margin: auto; to center that div before and Javascript manually positions the div.

PS: if you are using javascript to position things it may not be neccessary as you should be able to do most things with raw CSS.

NLUtil.jsp__NS_VER = 2014.2.0 (在resetDivSizes函数中)的第440行(取决于您的resetDivSizes )上,您正在动态更改“ div__body” DIV的宽度,这可能是这里的罪魁祸首。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM