|
Hi everyone,
I've got a few icons I'm using sprites for, however they seem to work in every single browser except IE7. My code's very simple:
<div style="display:inline;margin:0 10px">
<a href="javascript:window.print()" title="Print">
Print Page <div class="useicon" style="background-position:0px 0px"></div>
</a>
</div>
My useicon class:
div.useicon {
display:inline;
height:16px;
width:16px;
background:url('../img/icons.gif') no-repeat 0px 0px;
padding:0 8px
}
Now the problem apparently is the display:inline part of that - the sprites just don't show up as long as that div is inline (if I remove display:inline the sprites show up but the thing is I want everything on the same line). Already tried using span instead of div , unfortunately it appears that as long as the object is inline the sprites won't show up.
Any suggestions?
The padding: 0 8px is there to keep the width at 16px, because some browsers completely collapse the div because it's empty even though I've specified width:16px .
Thanks in advance
|
|
|
|
|
You might need to add a space to your div containing the sprite, inline rendering should always cause the height attribute to be ignored.
You will also need to add the style a {text-decoration: none;} to avoid an ugly line in your empty div.
|
|
|
|
|
Thanks! I can't believe I forgot to try that. It's working fine now.
|
|
|
|
|
Hi dear
you can let div#useicon stay block level but you must change a to block level and then float the div#useicon for gain width and height. and that work in all IE versions.
here the css code:
a
{
display:block;
width:16px;
height:16px;
overflow:hidden;
}
div#useicon
{
width:16px;
height:16px;
float:left;
}
I used overflow for get arount collapse height because of floating div#useicon .
|
|
|
|
|
I don't know if this can even be done... so before I pull out my hair figuring it out, I figured I would see if this is possible. What I want to do is this: Someone orders something from site, then on Merchant Computer, a printout of the order is printed directly to printer.
So in order for this to happen I'm assuming I would either have to have the printer connected to the same server that is hosting the website, somehow point directly (hardwire) to a specific computer on a specific IP address, or somehow write a file specically directed to the Merchants Hardrive and then calling a function to open that file and print.
Because I know php has that printer_open and all those cool print functions... but they only work internally or locally. I'm looking for an action that occurs externally to do something internally. It's hard to explain, so I apologize for the confusion. If I can somehow directly tell where to print to or write the file to a specific hardrive (I don't care about the privacy issues) then I know how to do the php script to print to the internal printer. Because the issue is that I don't have the site running from my own server (it's going to be hosting through a 3rd party) so I can't print to a printer because it doesn't know where to look.
Any help would be greatly appreciated!!!! THANKS
~michelle
|
|
|
|
|
You don't need a printer connected oth e web server. You can have a service running on any system that checks the database, or gets notified in some manner, then prints to a specific printer.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
What kind of service are you referring to? If something is done online, instantaneously I need it to print to a local printer. So if I have a service running that sees that a file is written or email sent out, how will it know the path to a specific printer if the file is called online? Or do you mean to have something running constantly on a local computer that constantly checks online activity then will print from a local printer? Because this is not a network ... I just want to see if I can direct a print job to a specific location... because if i just put "HP photosmart 150" or whatever the printer name is called, it is referring to a local computer on the client side... i need it to go the the merchant side. If you are saying to have a local checker (per say) running constantly, looking for activity online at a specific location, that makes more sense to me... but out of curiosity, what language would you write it in and how would you get it to run every minute or so automatically?
Thanks! I appreciate it!
|
|
|
|
|
Yes, you must have a local service runnng where the printing will occur. You can't direct a printer from the internet.
mrutkunas wrote: what language would you write it in and how would you get it to run every minute or so automatically?
It seems this very much out of your depth and needs to be left to others.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
You could just email a dedicated account with a link to the order and have someone responsible for processing the incoming emails.
This seems like something you should be able to develop. Although I like the idea of having a windows service poll the database and print out the order ... slick idea.
Good luck.
|
|
|
|
|
Expanding on your idea, you could set up a rule in the receiving mail client to print the incoming mail on arrival.
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Okay, well..... This is what I am trying to achieve....
Go to this url and see where it says "does not work on your " and then it print's out the type of device you're using.
So I am looking for a code that will detect what browser the user is viewing the website with and if it's not one of the up-to-date browsers for desktops, then it would redirect the user to a mobile version of the site. I am basically trying to get this to work for my Playstation Portable. Whatever google is using for their detection is basically what I am looking for, all that it needs is the redirection script for the full version of the site. Thanks in advance!
|
|
|
|
|
This is virtually trhe same request as the previous post, and notwithstanding Pete O'Hanlon's (perfectly valid) points, I still stick by my obstinate viewpoint! However, if you must... there are dozens of such scripts out there, have you tried Googling for "browser detection script" or some such? You may want to take a look at this page[^].
Also, try installing Firebug[^] (on Firefox) and then visiting that invisible url you may or may not have posted (...) and you'll probably be able to view the script used there, if that does what you want...
|
|
|
|
|
i want to know if i some user open's a webpage in IE6 Page1.html should be displayed and if user open's a webpage in Page2.html should be displayed
how can i achieve this kind of display
|
|
|
|
|
Do you really think your question is clear?
|
|
|
|
|
It isn't - but I assume he wants a JS function to redirect users to an appropriate page depending on what browser they are using - specifically on their version of IE...
... my answer to the OP would be: don't bother. Anyone still using IE6 gets what they deserve. Upgrades (or alternatives) are easy, and free, and really, IE6 is long past it's sell by date. It's dead now.
|
|
|
|
|
If so, then
<script language="javascript">
location.href="Newform.aspx";
location.reload;
</script> function works in IE6 too.
|
|
|
|
|
That's missing the point - OP wants a (cross-browser) function that will identify the user's browser adn then redirect them accordingly. There are such funcitons out there (Google them...) but of course they are subject to becoming out of date over time. As Is ay, I wouldn't (and don't) bother with it myself.
|
|
|
|
|
|
Wow - you don't deal with corporate inertia much do you? Many companies and government departments are still stuck using IE 6 because of the complexity and costs involved in rolling out new systems.
|
|
|
|
|
No, my clients are all in the private sector. Lucky me... Sorry, but I have no sympathy for anyone still using IE6. How hard is it, even for a government agency, to upgrade from IE6, really? It's just a browser, for FS, not an operating system....
|
|
|
|
|
NeverHeardOfMe wrote: Sorry, but I have no sympathy for anyone still using IE6.
I have sympathy for the end users - it's the management I have no sympathy for.
NeverHeardOfMe wrote: How hard is it, even for a government agency, to upgrade from IE6, really?
Considering the amount of paperwork, funding, testing of roll outs, software compatibility testing, it's surprisingly hard. Bear in mind that they may be upgrading 10 to 20,000 instances it's a fairly expensive task.
|
|
|
|
|
Hi all, I'm testing web pages I have written. Locally when I set a download link for a file, there is no download restriction. When I upload these files to the server and click the download link, I get the 403 forbidden error. How do I solve this problem? Please does it have anything to do with the .htaccess file? Currently the only thing I have written in the .htaccess file relates to the DirectoryIndex, and I don't know if download access also has to do with this .htaccess file. Please help.
|
|
|
|
|
A 403 could be caused by many different causes. Below is a short list you can check:
* the .htaccess file (but since you only did something with directoryindex it shouldn't)
* read access issues on the server, so your webserver cannot access the file (check security settings on the webserver)
* configuration issues on the webserver (eg: apache restrictions in the httpd.conf)
You can check if it is the .htaccess by temporarily renaming it, which will disable it.
Checking the access restriction of the webserver is a bit more difficult, but if you are renting a server from a hosting company it should be set OK. So this should only apply if you manage the server yourself.
|
|
|
|
|
I am still relatively new to programming especially asp. I am curious what is the recommended way or perhaps ways to integrate Javascript with Asp.net? I guess I should clarify this. I am working on a test project of a calculator where I would have all of the buttons except for the operation buttons work on javascript. The operation buttons (i.e. add subtract sqrt etc) would run on asp on the server. I have written a complete Javascript calculator and a complete asp calculator but this one seems to me a lot more challenging.
|
|
|
|
|
AJAX.NET could be a nice way to do this.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|