site rendering differently on different hosts [closed] - .htaccess

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 9 years ago.
I have spent the last few hours trying to figure this out but still no luck...I think I have narrowed it down as something to do with a file permission issue on my host but maybe someone on here would be so kind as to point me in the right direction.
I have exactly the same files loaded onto two different domain, host combinations
http://northern.uwcs.co.uk/ApricotGum
http://apricotgum.co.uk
site a. renders fine but exactly the same files uploaded to site b. render in a very different way breaking most of the sites layout.
some of the problems with site b:
FlexSlider navigation does not work.(edit this is fixed by turning off mod-pagespeed with ?ModPagespeed=off# *)
Variety of layout problems.
Animations on the top logo do not work.
Please note the site is designed for mobile content...
Many thanks

Your CSS are different. In Chrome Dev Tools, there are noticeable differences between styles from W.main.css.pagespeed.cf.4qEnpEHvwU.css and main.css.
E.g. .header in W.main.css.pagespeed.cf.4qEnpEHvwU.css:
.header {
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: transparent;
z-index: 2;
}
In main.css:
.header {
position: fixed;
top: 0;
left: 0;
width: 0%;
z-index: 2;
background-color: rgba(0,0,0,0.5);
transition: width 1s ease;
-webkit-transition: width 1s ease;
-moz-transition: width 1s ease;
overflow: hidden;
padding-top: 0.25em;
}

Related

How do I build a drawer in Material Components Web?

I am just getting into Material Components for the Web and I want to have a website sort of like this, although I tried the code from the docs (that is obviously not complete) and got this. How can I get something like the example?
MDC-Web provides a drawer component but not an app’s layout where this drawer can iterate with the content, so you should compose the required layout yourself. And, apart from that, you will need the sort of CSS reset to style some elements consistently across browsers. This is not an incompleteness of library, but its philosophy - to provide only Material Design components rather than “all-in-one” solution for developers. This quote is taken from one of their GitHub issues:
The goal isn't to be a framework and do a lot of little functions for
developers. It's simply to provide the Material Design Specification's
components to the web in a re-usable way. That's it. Anything that is
beyond that goes beyond the scope of what the project is trying to
achieve.
So, in the provided link from MDC-Web, you can see that there are CSS styles applied to elements like html, body and their layout. Namely, this:
html {
height: 100%;
}
body {
display: flex;
flex-direction: column;
min-height: 100%;
margin: 0;
padding: 0;
box-sizing: border-box;
}
.demo-content {
display: flex;
flex: 1 1 auto;
height: 100%;
box-sizing: border-box;
}
.demo-main {
padding: 16px;
}
You can view the demo on Codepen and ask me if you need a further clarification.

Targeting Chromecast with CSS Media Queries

What CSS3 Media Queries can we use to target Chromecast in the graphics view?
It doesn't seem to respond at all to something like:
#media tv and (device-width: 1280px){...}
The only query I have been able to get to work was:
#media(min-width: 1265px){...}
Which seems bonkers to me because the overscan is 32px anyway.
What are the best queries to use?
So far the best layout I have found is:
#media(min-width: 1265px) {
body {
position: absolute;
top: 18px;
right: 32px;
bottom: 18px;
left: 32px;
margin: 5px;
}
}
Which allows for the 18px * 32px overscan and an apparent additional 5px margin
Neil, I am not aware of a clean way to do this through Media Query at this point but you can potentially use the user agent fingerprint to discover that you are on the chromecast device; for example if strings "CrKey" and "TV" are in the user agent, then you are running on the chromecast.

SVG container renders wrong size in Safari desktop (fine in Chrome/iOS)

I thought Safari had sorted this but it still seems to be an issue (unless I'm doing something obviously wrong).
I have a SVG placed inside an object tag. That is wrapped in a flexible containing DIV (e.g set to be width 50%). On resize, the container height resizes in Firefox, Chrome and Opera as I would expect but on Safari the container stays too high.
Here's an example on Codepen to demonstrate, switch to the full size result or 'editor on side' (button bottom right) to see the effect clearly in Safari: http://codepen.io/benfrain/full/fhyrD
Besides using JS to resize the SVG on load/resize, does anyone know if there is anything else I can do to make Safari behave correctly? Could of sworn I'd figured this out a few weeks back but now I seem to be hitting the issue again.
So, Sérgio Lopez had an answer for this. You can employ the intrinsic ratio for video technique that Thierry Koblentz described here: http://alistapart.com/article/creating-intrinsic-ratios-for-video. More info at this blog post: http://benfra.in/20l
Here is the cut and paste code you need in your CSS:
Surrounding object tag
object {
width: 100%;
display: block;
height: auto;
position: relative;
padding-top: 100%;
}
And this for the SVG inside:
svg {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}

nav menu not centering properly using 960 grid

im trying to create a basic profile for someone and am practicing using the 960 grid system.
I've since got the hang of using grids enough to position most elements, however the menu seems a little off to me, the right side seems to be bigger then the left, even though ive centered the menu itself and its at 100% width.
Does anybody have any ideas on why it is playing up?
Site url is http://digitalgenesis.com.au/sites/alice
css is http://digitalgenesis.com.au/sites/alice/css/main.css
Reduce the ".nav a:hover"-s padding. I think this is the problem.
Try the CSS like this:
.nav{margin-top: 20px;background:black; color:white; padding-top:10px; padding-bottom:10px;text-align:center; }
.nav li{display:inline; }
.nav a:hover{background:white; color:black; padding:10px 0px 10px 0px;}
.nav a{text-decoration:none; color:white; }
.footer{background:black; color:white; margin-top:20px; position:fixed; width:100%; bottom:0px;}
#top{width:100%; background:black; color:white;}
.title{font-size:26px; margin-top:45px; padding-left :10px;}
.wrapper{margin-top:50px;}
.logo{margin-left:0px;}

Why isn't my sIFR text wrapping on a liquid design?

I have a simple line of text I'm replacing with sIFR for a header on my site. The site is liquid so it scales when the browser window changes width. But when I shrink the browser window down, the alt text (when I turn it on for testing) wraps to another line, but the sIFR text doesn't.
I've seen written elsewhere on the web that people implement in the sifr.js code a preventWrap=false function, but being new to JavaScript I'm not sure where to put it to make it work.
Here's the relevant CSS:
.sIFR-hasFlash h2 {
visibility: hidden;
letter-spacing: 1px;
font-size: 18px;
text-align: center;
line-height: 1.5em;
}
And the relevant JavaScript:
sIFR.replaceElement(named({sSelector: "h2",
sFlashSrc: "flash/h2_font.swf", sBgColor: "#006633",
sColor: "#FFFFFF", sFlashVars: "textalign=center", sWmode: "transparent"}));
Not sure where I would put the preventWrap=false, or if that's even the way to go.
sIFR 3 should fix this.
I had a similar problem, adding position:relative to your CSS might fix it.

Resources