Styling in xampp is different then files on my desktop? - php

The weirdest thing in the world is happening to me, and I wanted to ask if anyone has heard of anything similiar to this, and any possible solution. My designer created a website, on his own computer. I implemented his css + html in my code, and I noticed everything was coming out a bit bigger on my website (eg menu was wider, top bar was larger, etc)
After playing around with this for over 3 hours, I decided to just Save the website the designer made to my Desktop. I did this, opened it in chrome, and it was exactly like I saw on the designers site. I then proceeded to copy past the website I saved into xampp- and lo and behold, everything was bigger, JUST like in MY website. I have quite literally no idea what is going on, the exact same files on my Desktop are showing up differently when I copy them into xampp.
Any idea whats going on?
Thanks!
EDIT: To make matters weirder, it appears the enlarging only happens in chrome...

As per the comments
It's rather impossible to ensure that we can narrow down your issue without viewing any code or anything of the likes.
But first ensure that your browser is at proper standard settings.
Make sure you are zoomed out by pressing CTRL + 0 (on windows).
It could've also potentially have been that the stylesheet was missing something, but in this case it wasn't.

Related

Code changes in Netbeans not reflected in project

Often times while working in Netbeans the changes I make in my code are not visible in the actual project. I'm working on a website using HTML/PHP and a lot of times, I make certain changes to my code, save it and then when I open the website in my browser it's like I never made any changes. It's really frustrating. Please help.
PS: I've noticed it mostly happens when I make changes to the CSS file.
First I would think of blaming Netbeans. Or you for not letting Netbeans upload changes to the server on Save.
But if it is mostly CSS (and I suppose Javascript), I would think of caching by your browser.
You can try Ctrl-F5 -in your browser- for forced refresh.
Or set the cache settings on your development server so, that a file is never cached

file paths suddenly aren't working in html

So I am building a website for a client. I have the site in my htdocs folder within xampp as well as in a folder on my desktop.
I developed the home page a few days ago and everything has been working fine on it. I have a css file in a css folder, and I have images in an images folder. My file paths are correct, I know for a fact because I have spent the last 30 minutes checking them. My tag is set up correctly, and my images names are correct.
I have validated my html and css and both are 100% correct. I know with out a doubt that everything is as it should be. All I did was add a media query to the bottom of my css document, refresh the page to check it, and all of the styles and images are gone.
I have removed the media query, I have check back up of the file that should work like it did yesterday, and I have crawled up and down my code. For some reason neither the desktop or the xampp version of the page are working. I have exhausted all resources in understanding why this is happening. I thought it might be my computer but every pages I have been to is working fine so it has to be something in my files, only I have checked everything I can think of.
Has anyone had this problem, and can anyone think of something that I might have missed?
After deleting my meta tags (out of desperation, I don't know how I would have reached this conclusion) the file started working again.
I had copied the meta tags from another site I built to save myself some time. I went through each one to see who was causing the issue, and it turns out that this:
<base href="http://designsbygabe.com/" />
is the issue. I'm not sure how relevant this tag is. CMS made simple auto generated it on the site I copied it from.
I can only assume that because I am running off of xampp but telling my document that The above href is the base that it confused the browser. I don't really know though.
the weird thing is that I added these yesterday and the site work up until a few hours ago.
I guess the lesson here is that when in doubt you should check your meta tags.

Using Coda 2's (or Coda, for that matter) Preview feature with CakePHP

I am using Coda 2 and MAMP Pro. Many sites I have built work great with the pair, and when it works, it works. By allowing me to specify a Site-Specific URL and then letting Coda know what that URL is, the preview feature works fantastic. Until I started using CakePHP...
The problem is that say I specify the URL "myawesomesite" and point it to my local site directory in MAMP Pro, and then run the servers. I can navigate to "http://myawesomesite:8888" and everything works great, even on sites using CakePHP. However, when I click "preview" in Coda, even after specifying the correct Local URL, Coda tries to append the file structure (as it should in most cases) to the URL. Meaning that I get a URL like this: "http://myawesomesite:8888/app/View/Passes/index.ctp"
Is there any way to override the normal URL formatting of Coda 2's preview function? Or any other solutions?
I also use Coda 2 and CakePHP, and have the same issue. I've searched a lot and I'm 99.9% certain there's no way around it. Lots of people using web frameworks with Coda have the same problem, so it could be worth asking Coda for the feature - they're pretty responsive.
In terms of other solutions, I've started using Live Reload (http://livereload.com/). I work with two monitors, and have Coda in one screen, and Firefox open in the other. With Live Reload, whenever you save a file in Coda, Firefox will refresh and show your changes. No need to switch applications or press any keys, just code and glance over at your other window to see your changes. It's pretty awesome, but requires two monitors, or at least one big screen, to work really well.

Very Slow Page Load - ASP/PHP CSS file latency

I've searched for this, but can't find anything - maybe I'm describing it badly!?
Anyway - I have a website (on an IIS 6 server) whose pages loads 2 or 3 CSS files, these css files are actually ASP files with the response headers set accordingly.
The ASP in the files simply reads the query string to set colours of various css rules based on user preferences.
I've noticed that sometimes pages are loading very slowly, and using the dev tools in Chrome (although this seems to apply in all browsers) I could see the page load is stalling on these CSS files, the reported latency can be up to 2 minutes - everything else only takes a few milliseconds.
I've tried using PHP files instead of ASP files, but this makes no difference!
The website is behind password so I can't really demo it easily - although could try and set something up if it would help - Although it isn't consistent, it seem to happen most of the time, but sometimes can be quite fast!
Any ideas what I could try?
Thanks
A couple of things you can try are using Google's page speed or Yahoo's YSlow - both will generate suggestions for you to help improve performance.

Viewing PHP Pages in Dreamweaver Design Mode

I built a php site that is hosted with an ISP. A friend who is a designer is supposed to edit the page content. There's an area on the page that is open for page content, but most of the outer "wrapper" is built with include() files.
When she opens the files in design mode, everything is broken. I tried to set up a test server in DW, but this didn't work either. I never use DW and am stuck.
Is it possible to work on a file off of a server via ftp in real time with DW? If not, can it at least be configured to render the php code in design mode somehow?
Thanks,
D.
PHP is a server-side language, Dreamweaver is catered toward simple client-side HTML web pages. You would need to setup a PHP interpreter somehow in order for Dreamweaver to show you the output of the PHP, last I recall when I used DW years ago it didn't have that feature, so I doubt you'll be able to do this.
#meder: It appears you are correct for exactly the reasons you stated. The last time I used DW, I was only on the code side, so it never came up. I know we were saving to the server then, so I was thinking it could draw it from the server as well.
Alas, no luck. Sorry to post before I RTFW more.

Categories