Thomas Thomassen's Profile
Reputation: 10
Good
- Group:
- Members
- Active Posts:
- 2,225 (1.27 per day)
- Joined:
- 30-April 07
- Profile Views:
- 10,893
- Last Active:
Feb 06 2012 10:06 PM- Currently:
- Offline
My Information
- Member Title:
- HTTP 503
- Age:
- 28 years old
- Birthday:
- October 2, 1983
- Gender:
-
Male
- Location:
- Trondheim, Norway
- Interests:
- Archery, design, typography, monster killer robots from outer space
Contact Information
- E-mail:
- Private
- MSN:
-
msn@thomthom.net
- Website URL:
-
http://www.thomthom.net/
- Skype:
-
thomthom.net
Users Experience
- Experience:
- Advanced
- Area of Expertise:
- Designer/Coder
Latest Visitors
-
Renaissance-D... 
07 Feb 2012 - 15:37 -
Weeeb Store d... 
19 Oct 2011 - 05:50 -
Yemi_ng 
30 Aug 2011 - 11:30 -
BlueDreamer 
27 Aug 2011 - 19:35 -
SkyteMedia 
03 May 2011 - 23:18 -
Web Designer112 
03 Apr 2011 - 18:53 -
Dizi 
25 Feb 2011 - 07:01 -
Jock 
27 Jan 2011 - 01:17 -
DannyG17 
22 Jan 2011 - 14:31 -
Jack.S 
16 Jan 2011 - 11:26
Topics I've Started
-
Vertically centering a fluid image
06 February 2012 - 10:06 PM
Here's something I didn't expect to be so hard:
I have a page the display a random photo.
The image should not be larger than the viewport. (here I applied max-width)
The image should be centered in the viewport, horizontally and vertically.
To center vertically I tried to style the containers for the image as CSS tables. This does the vertical centering, but then the image doesn't scale down with the viewport. Seems that elements with table properties stretch to fit its content. Which defeat my fluid image size.
I then tried to use relative positioning, making the HTML and BODY element 100% height, offsetting the image container by 50% placing it at half height of the viewport.
But when I try to position the image itself by -50% (thinking it's take its height) to align the image in the vertical center instead of starting at the center nothing seem to work. relative position by percentage doesn't do anything. Fixed values does, but I can't use that because I don't know the image height.
Anyone has any idea on how to center a fluid image vertically in the viewport using CSS? Don't want to use JS for this. -
Custom CSS for smart phones
05 February 2012 - 07:20 PM
Hi there! Long time no see!
I've been playing with CSS for smart phones for the first time. I got an HTML page where I want desktop users get one CSS file, while users of smart phones get another.
Been trying this code, based on googling the topic, but it doesn't seem to work when I test on my Sony Ericsson Arc, Android 2.3.4.
<link rel="stylesheet" type="text/css" href="screen.css" media="screen and (min-device-width: 481px)" /> <link rel="stylesheet" type="text/css" href="handheld.css" media="only screen and (max-device-width: 480px)" /> <link rel="stylesheet" type="text/css" href="handheld.css" media="screen and (-webkit-device-pixel-ratio:0.75)" /> <link rel="stylesheet" type="text/css" href="handheld.css" media="handheld" type="text/css" />
The full page HTML is at this page: http://www.thomthom.net/qr/photos/
At the moment I've commented out the snippet you see above so it only serves the handheld stylesheet.
But how do you serve CSS to smartphones specifically? The media queries doesn't seem to do anything.
My first thought was that media type "handheld" was how you did it, but as it turns out smart phones uses the "screen" media style. But then the min-device properties should've worked, right?
Help




Find My Content
Display name history
Comments
Ben
23 Aug 2009 - 18:14I'm good thanks, been out in the garden most of the day enjoying the sunshine :)
Ben
23 Aug 2009 - 18:02How's your weekend going? :)
MacDesign
16 Aug 2009 - 19:33Just dropping by to say hello and just continue with your hobby of web designing.
MacDesign
Dizi
14 Aug 2009 - 11:33last time I was ID check was last year in a shop, I was with my mam and she took it as a compliment as if people think that I look young, she must look young as well :D
Dizi
14 Aug 2009 - 08:55Dizi
13 Aug 2009 - 19:25wizely
07 Aug 2009 - 15:31Dizi
06 Aug 2009 - 19:39Dizi
06 Aug 2009 - 19:22Dizi
06 Aug 2009 - 19:20Ben
06 Aug 2009 - 11:26tigerlabs
22 Jun 2008 - 20:06Dizi
30 Mar 2008 - 22:38Dizi
29 Mar 2008 - 12:06Ben
19 Mar 2008 - 18:02