Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
hayden.
Sep 11, 2007

here's a goat on a pig or something
I have a site I put together today for people to share game save files.

Here's an example file:

http://besiegedownloads.com/uploads/54d8027ee1979Bomber.bsg

Is there an easy way to force this to download when you click it, rather than showing in the browser? It's on a shared hosting account so I am not sure I can use an Apache solution I found (only have "Apache Handlers" option in cPanel).

Do I need to point to a PHP page that then has proper headers and then have it read the game save file? Or is there an easier way?

Adbot
ADBOT LOVES YOU

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.
I'd imagine if you can upload and execute PHP on the server then you must surely be able to upload a .htaccess file. I know you said you don't think you can do it, but just humor me and try this:

Create a file called .htaccess and add the following:
code:
AddType application/octet-stream .bsg
Upload that to your server. You should be able to place it at the root of your domain, but if that doesn't work try placing it in /uploads.
If you can't make a file called .htaccess because windows complains, call it "htaccess" without the dot, and rename it after you upload it.

If that doesn't work, try changing the content of the file to some garbage (random characters) and upload that. If you don't get a 500 server error, then you can't use a .htaccess solution because it's disabled on the server.

hayden.
Sep 11, 2007

here's a goat on a pig or something
Placed the htaccess in both root and upload directory with no luck (still there, you can test for yourself). I saw someone else say they tried that on stackoverflow without success so I skipped that step.

Random garbage did in fact lead to a 500 error.

Thanks a ton for the help, let me know if you can think of something else to try :)

edit: this is sweet, adding "download" to your anchor tag forces this. That helps for on-site links, but would still be very helpful for links on other sites to download correctly too.

edit2: Seems to work now, I changed it to "ForceType" then back to what it was, and suddenly it's working. Not sure why. Of course IE still doesn't save properly.

hayden. fucked around with this message at 03:29 on Feb 9, 2015

Sedro
Dec 31, 2008
Set the Content-Disposition in Apache (here's a guide or just google it)

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.
IE is kind of a jerk and has several methods to try and detect the type of file and act in the way it thinks you want to interact with it.
You can turn that off by forcing it to recognise the file as an attachment, using something like this:
code:
<FilesMatch "\.(?i:bsg)$">
      ForceType application/octet-stream
      Header set Content-Disposition attachment
</FilesMatch>
For that to work you need mod_headers installed on Apache, otherwise the Header directive will make the server 500 error. Give it a try, but I don't think it's usually enabled by default.

If you want a PHP solution, give this article a read: http://www.media-division.com/the-right-way-to-handle-file-downloads-in-php/

Ron Don Volante
Dec 29, 2012

Lumpy posted:

a) a script grabs the price of silver, either from an API, or scraping it off another site.
b) another script calculates the value of the coins based off of A

This is basic stuff; you need to know the price, and a little bit about each coin (name, amount of silver in it). The scripts could be run either on the server (before the page gets to you), on the client (after the page gets to you) or a mix of the two. Since I'm on my phone, I can't tell you which is the case on that particular page. Regardless, this would be a great learning project , or something someone exoerienced could bang out in a half hour.

My knowledge is limited to the basics of html/css at this point - do you have any recommendations for where to start learning about how to put a page like that together?

neurotech
Apr 22, 2004

Deep in my dreams and I still hear her callin'
If you're alone, I'll come home.

Do you guys have any recommendations on places to read to keep abreast of general web dev and design news? I currently look at echojs and anything that pops up on twitter, but that's about it.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

neurotech posted:

Do you guys have any recommendations on places to read to keep abreast of general web dev and design news? I currently look at echojs and anything that pops up on twitter, but that's about it.

http://sidebar.io

Ron Don Volante posted:

My knowledge is limited to the basics of html/css at this point - do you have any recommendations for where to start learning about how to put a page like that together?

Sure thing. I'll throw something together this am if nobody beats me to it.

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

neurotech posted:

Do you guys have any recommendations on places to read to keep abreast of general web dev and design news? I currently look at echojs and anything that pops up on twitter, but that's about it.

I enjoy The Shoptalk Show podcast. They discuss current news/drama, and are also quite entertaining.

Asshole Masonanie
Oct 27, 2009

by vyelkin

neurotech posted:

Do you guys have any recommendations on places to read to keep abreast of general web dev and design news? I currently look at echojs and anything that pops up on twitter, but that's about it.

http://webplatformdaily.org/

chami
Mar 28, 2011

Keep it classy, boys~
Fun Shoe
IE10 is supposed to raise the selector limit from the 4095 IE9 and below were limited to, right? I have one specific style that doesn't show up at all unless I force the site to load the blesscss'd css file for IE9 and below.

Of course, the real issue is that there are way too many selectors but I'm just curious about this.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
Is there any way to get the visibility classes for Foundation (hide-for-small-only, show-for-small-up, etc) to display inline when visible? It seems it's either block or none which is not what I want. If I do inline!important then it just never hides.

kedo
Nov 27, 2007

The Merkinman posted:

Is there any way to get the visibility classes for Foundation (hide-for-small-only, show-for-small-up, etc) to display inline when visible? It seems it's either block or none which is not what I want. If I do inline!important then it just never hides.

Media queries sound like the solution you need.

CSS code:
@media screen and [dimensions] {
  .hide-for-small-only {
    display: inline !important;
  }
}

Ghostlight
Sep 25, 2009

maybe for one second you can pause; try to step into another person's perspective, and understand that a watermelon is cursing me



I've got a solution to a problem but it's basically hacking around a bush with a machete and I was wondering if there's a really easy and elegant solution I'm completely overlooking.

I've got a php function
php:
<?
function Images($mode,$article,$youtube = NULL) {
    $thumbsGlob = glob("images/$mode/$article/$article*g.jpg"); natsort($thumbsGlob); 
    if($youtube) { array_unshift($thumbsGlob,$youtube); }
    return $thumbsGlob; 
}?>
that I recently wrote to try and consolidate a bunch of file handling code across web pages, but the function is called from several different directories and only works in the base directory due to the folder pathing. If I set document_root in the folder path then it doesn't return clean URLs that can be plugged straight into <img>; if I chdir then it fucks up other scripts on the pages, and of course php doesn't recognise /images as a base directory in the same way that HTML does.

Is there a nice succinct way to tell php to use the base directory for pathing regardless of what directory the function is called in while also providing a URL to the resource that doesn't require cleaning up before sending back for use?

TheEffect
Aug 12, 2013

TheEffect posted:

Copying and pasting the image URL gives me the following default 404 from ApacheTomcat-


The folder with the images store the images for all webpages on the site, so it can't be permissions since it works on the other pages right?

Here are the paths, taken from "copy-shortcut", to the images from the non-working page and a working one-

[url]http://[/url][internal site]/html/Old_Ops_Website/pics/ops-logo.jpg
[url]http://[/url][internal site]/html/Old_Ops_Website/pics/connection.jpg

Given those pieces of information, I'm absolutely bewildered as to why this isn't working.

Not sure if it makes any difference but the actual root of the website is located in "C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT" while the page I'm working on is located in "C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT\html\Old_Ops_Website". Both directories have index files.

I tried changing the index file to another name and hitting it via "http://[internal site]/html/Old_Ops_Website/test.html" with the same results.

Also tried "<img src="./pics/opslogo.jpg"/>", just in case, but no-go still.

Editeditedit-

Ok so I tried it with the images that I know for sure to be working on other pages and they show up on the index page as well. I still don't understand why the others won't show up since all the images are located in the exact same directory and when viewing the website from the host all images render correctly. Next I tried to link the images that aren't working to one of the other pages and they don't work there either. I've triple checked and the images are definitely in the right directory and in the correct format and I can open them up and view them. What the hell?

I went ahead and set the site up on my public dev server- https://www.galaxyforge.net/dev/html/ROOT/html/Old_Ops_Website . As you can see here- https://www.galaxyforge.net/dev/html/ROOT/html/Old_Ops_Website/pics the photos are in the correct directory, the HTML page is referencing the correct images, but nothing is coming up. FYI - I didn't create this site. This is about 10-15 years old which is why I'm hiding it on our current site as an easter egg for people to get a laugh at.

Ghostlight
Sep 25, 2009

maybe for one second you can pause; try to step into another person's perspective, and understand that a watermelon is cursing me



I don't want you to kick yourself, but looking at your pictures folder the images you mentioned as working work because they are .jpg

The images that are not working do not work because they are linked as .jpg on the index but are, in fact, .JPG

TheEffect
Aug 12, 2013

Ghostlight posted:

I don't want you to kick yourself, but looking at your pictures folder the images you mentioned as working work because they are .jpg

The images that are not working do not work because they are linked as .jpg on the index but are, in fact, .JPG

Wow. I didn't even consider that to be an issue since they showed up on the host machine just fine. You're absolutely right, that was indeed the issue. Now I can stop ripping my hair out. Thank you so much!!!!

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:
Stupid question incoming! I need advice on a htaccess file. I would like the root to redirect to either yes.html or no.html depending on which ever one exists. Is this possible?

I have a stupid site where I want to upload a simple file to display yes or no. To change this I will upload either file and delete the other.

Kobayashi
Aug 13, 2004

by Nyc_Tattoo

thegasman2000 posted:

Stupid question incoming! I need advice on a htaccess file. I would like the root to redirect to either yes.html or no.html depending on which ever one exists. Is this possible?

I have a stupid site where I want to upload a simple file to display yes or no. To change this I will upload either file and delete the other.

Why don't you just call it index.html and rename/edit the file when YES happens?

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:
Edit:

Dont worry I found out the $2.99 app I got allows editing. Changing 3 letters was MUCH easier!

thegasman2000 fucked around with this message at 00:08 on Feb 10, 2015

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
Cross-posting from the Front-end Developers thread, can anyone give me some advice on how I might improve my Firebase Auth service to better convey error messages to AuthController? The tutorial I was working through uses an older version of the AngularFire so I had to update the code to work with the new authentication API calls. I'm having an issue where errors are caught in the Service, so the Controller has no idea that anything's gone wrong unless I check for an error every time the function is called.

Here's the start of my Auth service:
code:
app.factory('Auth', ["$firebaseAuth", "FIREBASE_URL", "$rootScope", function($firebaseAuth, FIREBASE_URL, $rootScope) {
	var ref = new Firebase(FIREBASE_URL);
	var auth = $firebaseAuth(ref);

	var Auth = {
		register: function(user) {
			return auth.$createUser({email: user.email, password: user.password})
				.then(function(userData) { Auth.error = ''; })
				.catch(function(error) { Auth.error = error.message; console.log('Authentication failed:', error); });
		},
And here's how I'm checking for errors from within my AuthController:
code:
// Register the user with Firebase, then login as the user, then
// redirect them to the main page
$scope.register = function() {
	Auth.register($scope.user).then(function() {
		if(Auth.error) {
			$scope.error = Auth.error
		}
		else {
			return Auth.login($scope.user).then(function() {
				if(Auth.signedIn()) {
					console.log('Redirecting to main page');
					$location.path('/');
				}
				else {
					$scope.error = Auth.error;
				}
			});
		}
	});
};
The end goal is populating this simple <p> element with the error message:
code:
<p ng-show="error" class="text-danger">{{ error }}</p>
Right now everything works fine but I'm getting the feeling that there's a better way to do this.

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.

Karthe posted:

Right now everything works fine but I'm getting the feeling that there's a better way to do this.

Your use of .catch is deceptive and over complicating this whole thing. .catch(errorCallback) isn't acting like try/catch, but instead it's just for handling a deferred promise object which gets .reject()'d.

Auth.register is returning a Defered promise object. During Auth.register you're attaching callbacks to it, and they simply update properties of the Service. This is fine if you want to store the last error, but not necessary if you want to handle the reject() case.
Your code works because you can attach multiple handlers to a promise resolve/reject occurrence.

I'm actually a little conflicted as to how your code is working anyway, because you only handle the resolve() (.then) outcome of the promise in the controller, and not the reject() (.catch) outcome. I wouldn't expected your code to work properly.

You could probably simply with this instead (untested):
code:
	var Auth = {
		register: function(user) {
			return auth.$createUser({email: user.email, password: user.password});
		},
		login: function(user) {
			return auth.$authWithPassword({email: user.email, password: user.password})
				.then(function(authData) { Auth.user = authData; })
				.catch(function(error) { Auth.user = null; });
		},
code:
$scope.register = function() {
	Auth.register($scope.user)
		.then(function(userData) {
			// Success! try login...
			Auth.login($scope.user)
				.then(function() {
					console.log('Redirecting to main page');
					$location.path('/');
				})
				.catch(function(error) {
					$scope.error = error;
				});
		})
		.catch(function(error) {
			// Fail. Report error.
			$scope.error = error;
		});
If you still want Auth.error to be present, then there's no problem in keeping that around in the service for other things to access if they're interested (think of it as "lastErrorThatOccurred"). But if you can deal with the promises directly and capture the errors usefully, there's no reason to keep it around.

Chris!
Dec 2, 2004

E
Hey, I wonder if someone can help with a jQuery issue!

Here's a simplified Codepen (this is kind of cobbled together from the actual code, so stuff looks weird and doesn't line up, colours have been stripped out etc, images replaced with temp images etc): http://codepen.io/anon/pen/gboLYx

The navigation on the left is intended to always be the same height as the image to the right. So as the page size decreases, and the image gets smaller, so do the list items. Or if a new list item is added, the overall list is still the same height. Hovering over a nav item with a submenu makes the submenu appear to the right. This all works fine.

Under a certain size - 1024px - the image becomes 100% width, and the nav is hidden, toggled by a menu icon. Clicking this slides down the nav. To reveal a submenu, clicking a "+" icon opens the menu.

This is all triggered both on document.ready and on window.resize.

The window.resize is working fine for the larger screens, recalculating the height of the list items as the screen is reduced in size. but when you get below the 1024px breakpoint, the hasDropdown submenu should be activated by clicking, rather than by hover. It works fine if you refresh the screen, but actually shrinking down to that size isn't triggering the change - code within the if(window.width > 1024) conditional statement is executing, even under 1024 if you shrink down to get there.

If you start under 1024, then expand the window bigger, it seems to work fine.

If you could make me understand why the window.resize is ignoring the conditional, I'd be really grateful! I'm quite new to jQuery so this is a learning experience for me.

Thank you!

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

Not sure if this is the correct thread, but can anyone tell me the best way to go about obtaining a domain name that, according to who.is, is "reserved by the Registry in accordance with ICANN Policy"? It's a .house domain.

kedo
Nov 27, 2007

caiman posted:

Not sure if this is the correct thread, but can anyone tell me the best way to go about obtaining a domain name that, according to who.is, is "reserved by the Registry in accordance with ICANN Policy"? It's a .house domain.

You can't, it's not for sale. ICANN has reserved the name for a specific organization. I'm not sure if it's all inclusive, but anything on this list is more or less off limits.

You trying to get white.house? You crafty bastard. ;)

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

kedo posted:

You can't, it's not for sale. ICANN has reserved the name for a specific organization. I'm not sure if it's all inclusive, but anything on this list is more or less off limits.

You trying to get white.house? You crafty bastard. ;)

Nope, trying to get my name, chris.house. I can't figure out why it's reserved :(

IAmKale
Jun 7, 2007

やらないか

Fun Shoe
Is there any recommended reading on how best to store/structure data in a NoSQL database? I'm pretty comfortable with SQL and relational databases but NoSQL is like the wild west to me. For example, foreign keys don't appear to really be a thing so it seems easy to inadvertently end up with duplicated data all over the place.

Edit:

v1nce posted:

If you still want Auth.error to be present, then there's no problem in keeping that around in the service for other things to access if they're interested (think of it as "lastErrorThatOccurred"). But if you can deal with the promises directly and capture the errors usefully, there's no reason to keep it around.
Thanks for emphasizing the fact that I'm getting back a promise whenever I register/log in a user. It's way easier (and cleaner) for me to just return the promise from the Service and let my Controller handle it, as you suggested.

IAmKale fucked around with this message at 18:58 on Feb 10, 2015

revmoo
May 25, 2006

#basta
The whole point (correct me if I'm wrong pls) of a nosql db is that there is no relational data. You're either storing high-performance key/value data or unstructured documents. If you need relations you use something else. As far as I know the only way to get something like foreign keys to work would be in your application database wrapper. Which seems fine to me--keep your rdbms and key it in software to whatever nosql solution you need for that portion of your data. We actually do this at work to coorelate memcached values to data in our Postgres DB.

IAmKale
Jun 7, 2007

やらないか

Fun Shoe

revmoo posted:

The whole point (correct me if I'm wrong pls) of a nosql db is that there is no relational data. You're either storing high-performance key/value data or unstructured documents. If you need relations you use something else. As far as I know the only way to get something like foreign keys to work would be in your application database wrapper. Which seems fine to me--keep your rdbms and key it in software to whatever nosql solution you need for that portion of your data. We actually do this at work to coorelate memcached values to data in our Postgres DB.
Foreign keys were just an example of a difference between the two. I'm more interested in reading up on best practices for modeling data in a NoSQL-friendly way.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Karthe posted:

Foreign keys were just an example of a difference between the two. I'm more interested in reading up on best practices for modeling data in a NoSQL-friendly way.

Since NoSQL covers a HUGE gamut of things from document stores (Mongo and pals) to Key-Value Stores (Redis & co.) to graph DBs, there's no "best practice for NoSQL". Duplicated data is sometimes the correct thing to do in document based versions....

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Anyone know of a JS library that'll give me basic, user-editable diagramming objects. The one on http://rkirsling.github.io/modallogic/ is close enough that I could probably mash it into approximately what I want it to be, but I'm looking for something a little less opinionated about how it looks out of the box and that won't move itself around. It'd only have to support 'boxes' and 'lines' if that makes it easier.

Sedro
Dec 31, 2008

Lumpy posted:

Since NoSQL covers a HUGE gamut of things from document stores (Mongo and pals) to Key-Value Stores (Redis & co.) to graph DBs, there's no "best practice for NoSQL". Duplicated data is sometimes the correct thing to do in document based versions....
This. Every database is a unique snowflake. Mongo and Elasticsearch are totally different, and they are both document databases. Also many no-squeals support SQL.

Find the best database for your goal. Here's a good list

Leshy
Jun 21, 2004

Chris! posted:

If you could make me understand why the window.resize is ignoring the conditional, I'd be really grateful! I'm quite new to jQuery so this is a learning experience for me.
The window.resize is not ignoring the conditional.

If you load the window at a > 1024 size, it will attach the .hover() handler to the .hasDropdown li's. If you then shrink the window down to a < 1024 size, it will go through the conditional again and not attach the .hover() handler again, but since you're not removing it either, it will still be there from the previous time. The .hover() handler is basically a shortcut for checking the 'mouseenter' and 'mouseleave' events, so you'll need to specifically remove those in the else portion of your conditional:
code:
} else {  // for smaller viewports, the subnav is revealed by clicking the "open icon" and slides down.
  $(".hasDropdown").off("mouseenter mouseleave");
  $(".hasDropdown .open-icon")[...]
Also, .bind() and .unbind() have been superseded by .on() and .off(), so you might want to use those instead.

You may also want to consider moving the functions in your conditional to seperate functions, have them set a variable to true/false and only use the conditional to check whether the variable is set. Currently, every resize of the window > 1024 has the script setting up the .hover() functions all over, and every resize < 1024 sets up the .click() function all over. Your users will get better performance if the conditional only has to check whether the .hover() and .click() functions have been set, and do nothing if that's the case.

Chris!
Dec 2, 2004

E

Leshy posted:

The window.resize is not ignoring the conditional.

If you load the window at a > 1024 size, it will attach the .hover() handler to the .hasDropdown li's. If you then shrink the window down to a < 1024 size, it will go through the conditional again and not attach the .hover() handler again, but since you're not removing it either, it will still be there from the previous time. The .hover() handler is basically a shortcut for checking the 'mouseenter' and 'mouseleave' events, so you'll need to specifically remove those in the else portion of your conditional:
code:
} else {  // for smaller viewports, the subnav is revealed by clicking the "open icon" and slides down.
  $(".hasDropdown").off("mouseenter mouseleave");
  $(".hasDropdown .open-icon")[...]
Also, .bind() and .unbind() have been superseded by .on() and .off(), so you might want to use those instead.

You may also want to consider moving the functions in your conditional to seperate functions, have them set a variable to true/false and only use the conditional to check whether the variable is set. Currently, every resize of the window > 1024 has the script setting up the .hover() functions all over, and every resize < 1024 sets up the .click() function all over. Your users will get better performance if the conditional only has to check whether the .hover() and .click() functions have been set, and do nothing if that's the case.

Hey, thank you for taking a look at this for me! That makes total sense and is a huge help.

I've rewritten everything as per your suggestions, it works great on the actual site. I've copied the code into the Codepen, which looks hugely screwed up as most of the css and stuff is missing, but the basic idea still works. Does this look alright to you? I'm inexperienced writing this stuff, so even basic advice (like unbind being superseded by .off) is hugely appreciated. http://codepen.io/anon/pen/VYyyJj

Edit: another thing I can't figure out - when I manually increase the size of the window, the height of the left navigation increases to match the height of the image. But if the window size is small, and I hit the Maximize window button (or double click the title bar or whatever), the leftnav doesn't resize at all / it stays small. If I then resize the window manually, it resizes as required. The window.resize event is definitely being recognised, if I put an alert in there it fires as a window.resize event, but it's not resizing the content to match the image height. Any idea what I'm missing here?

Chris! fucked around with this message at 13:13 on Feb 11, 2015

revmoo
May 25, 2006

#basta
Anybody have a JS replace() snippet that can translate rgba() functions with opacity into hex with opacity?

EDIT: nm figured it out.

replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9.]+)\)"/g,'$1="rgb($2)" $1-opacity="$3"');

revmoo fucked around with this message at 19:28 on Feb 11, 2015

darthbob88
Oct 13, 2011

YOSPOS
Is there an easy way to detect whether somebody's viewing my site on a mobile browser or desktop/laptop? Specifically, I want to be able to send a GA event saying "Viewing on Desktop" or "Viewing on Mobile". I've considered using screen sizes, but that runs into problems on high-res tablets/low-res desktops. Maybe useragent strings would work better?

revmoo
May 25, 2006

#basta
Yeah that seems like a solved problem. Doesn't Google Analytics already do this?

darthbob88
Oct 13, 2011

YOSPOS
It does, and that's actually half the problem. According to my boss, our internal tracking isn't matching the GA data as far as visits from desktop/tablet/phone/telepathy are concerned, so he wants to beef up our tracking to find out where the mismatch comes from. Which means I have to know and log whether somebody's visiting from desktop/tablet/phone/tin cans on a string. I am quite happy to tell him it's impossible/impractical, but if there is a quick and easy way, fuckit, let's add it.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
There really isn't. A web browser can pretend to be whatever the gently caress it wants to be. Chrome calls itself "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36" in its user agent string. The best you can get is rough metrics based on things you can generally measure, and its unlikely you'll find a way to be more accurate than what analytics tells you.

Adbot
ADBOT LOVES YOU

fuf
Sep 12, 2004

haha
ugh this is a really basic question but I'm too dumb to figure it out.

I want this layout, but with the sidebar going all the way to the top of the page (next to logo):
http://jsfiddle.net/WCzaN/90/

I can do it by moving the sidebar to the top:
http://jsfiddle.net/WCzaN/91/
but then when the site switches to one column for narrow screens all the sidebar content will be above the header, menu etc. which is no good (http://jsfiddle.net/WCzaN/94/).

How do I keep the sidebar as the bottom element but make it float right all the way to the top of the page? :(

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply