473,323 Members | 1,589 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Safari isn't constraining proportions of my resized images

2
Alright, very new to this HTML business, but here goes.

I regularly scan and post my sketchbook pages on conceptart.org and usually scan em at about 525x380 pixels, never much bigger than that. I also want to be able to post them on my website's sketchblog that I've set up through blogger.com. My website. To keep the images from being too big and messing up my layout on the blog page I added the HTML,

img {max-width:400px;max-height:450px !important}

Keeps the images just small enough to stay on the page and I don't get a horizontal scroll bar. Works exactly like I want in Firefox but Safari isn't constraining the proportions of my images.
I'd just like to know if there was a simple way to tell Safari to contrain the proportions with HTML.
Again, here's my website and if you click sketchblog you can see what I'm workin at.

Also, the whole thing goes to bollocks in IE, but I imagine that's a post for another time. Unless someone has a simple, magic "make IE play nice" fix all. :)
Dec 15 '06 #1
5 1907
AricC
1,892 Expert 1GB
Why don't you try giving it a fixed width? This article has a fix for min-height/width issue.


HTH,
Aric
Dec 15 '06 #2
steven
143 100+
I imagine he doesn't want to use fixed width in the case the images are of a smaller size than the maximum stated dimensions he wants to allow.

Internet explorer doesn't support the max-width / max-height properties (surprise surprise), but you can use the underscore hack to get around that issue.

Expand|Select|Wrap|Line Numbers
  1. img {
  2.   max-width: 400px;
  3.   _width: 400px;
  4. }
This works because all standards compliant browsers see "_width" and ignore it because there's no such property "_width". Internet Exploder on the other hand, ignores any underscore at the start of a property and actually sees "width", which of course, it sets.

Not the best solution, but...

On the other hand, you could also create a containing div around your img and set the overflow to hidden. Again, not a great solution. I don't have konqueror or safari installed here, so I can't test for you.

PS, you have some nice sketches... some of them remind me of a style I really liked from some old 2000ad comics. Heh - I think some of it has to do with the redness of the noses. I like it. =)
Dec 15 '06 #3
steven
143 100+
Hah, now I look further, I realise I've seen your Sketch book on concept art! I remember liking the lines and had a good giggle at the self portraits of your facial expressions.

http://www.andyparrish.net/Images/Portfolio/Fisticuffs.jpg

That's you, right? Anyway - good luck with your new love affair with html.
Dec 15 '06 #4
Andy P
2
Hey man, many thanks for your replies. I'm pretty sure that I don't want to have to set a constant width for all the images if the proportions aren't gonna stay constrained. And I don't want the overflow getting hidden, so I imagine I'm gonna have to manually resize and re-upload these images for the blog. A pain, but I'm not savvy enough to go wrangling with browser specific HTML yet. I have a long long way to go before I can call my relationship with HTML a "love affair", hah.

Again, thanks for the help, and thanks for checkin out my stuff, I'm always pleasantly surprised at how much that CA sketchbook site gets around.
And, yeah, the jackass makin goofy faces is me. :)
Dec 16 '06 #5
AricC
1,892 Expert 1GB
Hah, now I look further, I realise I've seen your Sketch book on concept art! I remember liking the lines and had a good giggle at the self portraits of your facial expressions.

http://www.andyparrish.net/Images/Portfolio/Fisticuffs.jpg

That's you, right? Anyway - good luck with your new love affair with html.
That scetch reminds me of the Notre Dame mascot!
Dec 16 '06 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: David | last post by:
On every web browser except Safari, this website works great. (Well, by "every" I mean Mozilla, Netscape, and Internet Explorer, for Mac and Windows). The site is: http://www.ruleofthirds.com ...
2
by: Chris | last post by:
I'm desperately trying to get my site finished against the clock. It looks great in FF, Opera and IE6 but falls apart in IE5 and Safari. I HAVE to have it ok for IE5.x. Has anyone got any...
5
by: joaopedrogoncalves | last post by:
Hi, I want to load an external javascript file, get its results and stick them inside a <div> block. I also want to do this in several places on a web page. This way the browser doesn't have...
13
by: BMc | last post by:
I just want to take a moment to say thank you to so many of you who posted a response to my request for help about the problem with THE GAP (see below?)! Your suggestions were not only a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.