Is it possible to take a web page that lets say has CSS that makes the header position:fixed, then use php and use either cURL or file_get_contents, and apply my own CSS file to change that header to position:absolut?
10319
I have a simple page that has some iframe sections (to display RSS links). How can I apply the same CSS format from the main page to the page displayed in the iframe?
90657
I wonder if there is an existing  module that can help in the subject. I am not looking for a caching module (like Boost or Varnish), but a way to export my whole site (or only certain pages) into static.  The idea is that I want my web server will be a very simple and light and will only serve static files (html/css/js) - no database on production, no php engine will be installed on server. All the Drupal engine will be on another server, export will be done each time adding/editing/changing a node or view, and a new set of html files will be created in a directory structure.  These files will later on be copied to the production site that will serve always and only static files, no .htaccess that will check requests if file exist etc.   Is there a module for that, or a workaround that this can be achieved with Drupal?  Thanks
113423
I have a website that sells music artists posters. Each artists has a page containing a small bio, and a list of posters we are selling representing the artist.  Currently our HTML looks like that  &lt;h1&gt;{Artist name}&lt;/h1&gt; bio &lt;h2&gt;Posters&lt;/h2&gt; &lt;ul&gt;   &lt;li class="poster"&gt;...&lt;/li&gt;   ... &lt;/ul&gt;   We are redesigning this page, and we have a new template that we really like. Problem is that in this new version the &lt;h2&gt;Posters&lt;/h2&gt; does not appear anywhere on the page.  As you might expect, a significant part of our traffic comes from people typing something like : "{Artist name} poster" on Google.  I fear that, by removing the word "poster" from the page, we will reduce our chances of getting these people to come to the site, since Google might down rank us.  I see several options here :   Give Google a slightly altered page that contains the H2 tags. But I think this falls into the "Black Hat SEO" category. And I don't want that. Put the heading. Hide it with CSS. Everyone wins, including accessibility tools which can determine the structure of the page using the "invisible" heading. But I do not know if this is considered a good practice. Forget about the heading, and find other ways to tell Google that we really are about posters. (via keywords, but do they really have the same "weight" as an H2?) Adapt the design to our SEO need, and find a way to put that heading nicely.   Are there webmasters out there that have been facing the same issue, how did you resolve it?
25699
Anyone know a simple method to swap the background color of a webpage using JavaScript?
91040
I wrote a PHP code like this  $site="http://www.google.com"; $content = file_get_content($site); echo $content;   But when I remove "http://" from $site I get the following warning:     Warning:   file_get_contents(www.google.com)   [function.file-get-contents]: failed   to open stream:   I tried try and catch but it didn't work.
58040
I want to add background image, to part of my header i wrote code like this.  but its not working.   &lt;div style="{!'background:' + v.backgroundColor + ' url(' + v.backgroundImageURL +') no-repeat;background-position: center;background-size: cover;'}"&gt;  &lt;/div&gt;     doInit : function(component, event, helper) {          var url = $A.get('$Resource.RollingHillsGrey1');         component.set('v.backgroundImageURL', url);     }
35033
As per Yahoo's much-ballyhooed , we serve up static content from a CDN using far-future cache expiration headers. Of course, we need to occasionally update these "static" files, so we currently add an infix version as part of the filename (based on the SHA1 sum of the file contents). Thus:  styles.min.css   Becomes:  styles.min.abcd1234.css   However, managing the versioned files can become tedious, and I was wondering if a GET argument notation might be cleaner and better:  styles.min.css?v=abcd1234   Which do you use, and why? Are there browser- or proxy/cache-related considerations that I should consider?
77342
Is it possible to to change a &lt;span&gt; tag (or &lt;div&gt;) to preformat its contents like a &lt;pre&gt; tag would using only CSS?
9647
Given the following HTML:   &lt;div id="container"&gt;   &lt;!-- Other elements here --&gt;   &lt;div id="copyright"&gt;     Copyright Foo web designs   &lt;/div&gt; &lt;/div&gt;    I would like #copyright to stick to the bottom of #container. Can I achieve this without using absolute positioning?
115241
I'm trying to add a custom CSS class to the &lt;body&gt; tag, How can I modify or pre-process the &lt;body&gt; tag to add the class body, Is it right to style the &lt;body&gt; tag with css file?
25224
Let's say I want a way to display just the the center 50x50px of an image that's 250x250px in HTML. How can I do that. Also, is there a way to do this for css:url() references?  I'm aware of clip in CSS, but that seems to only work when used with absolute positioning.
71259
I notice a steady stream questions in the HTML and CSS tags that point to a site or CSS style sheet, and describe a problem without incorporating any code into the question. A few random examples:      (at least has a screenshot, but still)  Although it is totally understandable and natural for an OP to ask this way - they probably even think they are doing the site a service by not cluttering it! -  I can't shake the feeling that these questions are a problem: They will lose all value to future generations when the problem has been fixed. The OP is likely to fix the problem in the site source, and it becomes impossible to ever again see the source code of the problem that the answers solve. Asking the OP to incorporate code into the answer will work sometimes, but usually it won't. Is this a real problem? If it is, what to do?
87754
One major shortcoming of curl is that more and more wepages are having their main piece of content painted by a JavaScript AJAX response that occurs after the initial HTTP response. curl never picks up on this post-painted content.   So to fetch these types of webpages from the command line, I've been reduced to writing scripts in Ruby that drive the SeleniumRC to fire up a Firefox instance and then return the source HTML after these AJAX calls have completed.  It would be much better to have a leaner command line solution for this type of problem.  Does anyone know of any?
117376
My php is weak and I'm trying to change this string:  http://www.example.com/backend.php?/c=crud&amp;m=index&amp;t=care                                    ^   to be:  http://www.example.com/backend.php?c=crud&amp;m=index&amp;t=care                                   ^   removing the / after the backend.php?. Any ideas on the best way to do this?  Thanks!
69318
What I'm trying to do here is get the headers of a given URL so I can determine the MIME type. I want to be able to see if http://somedomain/foo/ will return an HTML document or a JPEG image for example. Thus, I need to figure out how to send a HEAD request so that I can read the MIME type without having to download the content. Does anyone know of an easy way of doing this?
111875
I try to download a file with wget and curl and it is rejected with a 403 error (forbidden).  I can view the file using the web browser on the same machine.  I try again with my browser's user agent, obtained by . I do this:  wget -U 'Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0' http://...   and  curl -A 'Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0' http://...   but it is still forbidden. What other reasons might there be for the 403, and what ways can I alter the wget and curl commands to overcome them?  (this is not about being able to get the file - I know I can just save it from my browser; it's about understanding why the command-line tools work differently)  update  Thanks to all the excellent answers given to this question. The specific problem I had encountered was that the server was checking the referrer. By adding this to the command-line I could get the file using curl and wget.  The server that checked the referrer bounced through a 302 to another location that performed no checks at all, so a curl or wget of that site worked cleanly.  If anyone is interested, this came about because I was reading  page to learn about embedded CSS and was trying to look at the site's css for an example. The actual URL I was getting trouble with was  and the curl I ended up with is  curl -L -H 'Referer: http://css-tricks.com/forums/topic/font-face-in-base64-is-cross-browser-compatible/' http://cloud.typography.com/610186/691184/css/fonts.css   and the wget is   wget --referer='http://css-tricks.com/forums/topic/font-face-in-base64-is-cross-browser-compatible/' http://cloud.typography.com/610186/691184/css/fonts.css   Very interesting.
4757
I have some "corporative" systems I have to use at work. Some of them are terrible, with frames, pop-ups and such.  I was thinking about automating some stuff using curl or something like that. I need login, click on hyperlinks, set some data, and them do some post.  Is it possible to use curl? Or am I'm going to be better using something like Selenium?