[thelist] controlling image height in Safari

Nan Harbison nan at nanharbison.com
Sun Sep 27 11:13:09 CDT 2009


You could do a Safari-only fix at the bottom of the style sheet so it is the
last command Safari sees about this:

@media screen and (-webkit-min-device-pixel-ratio:0) {
  #center{ 
	padding-right:15px; 
  }
} 

Between the first line and closing bracket, add some CSS. I left in a div so
you can see how it works. I have no idea why Safari is the only browser to
see the CSS inside, someone told me about this. Maybe it is bad form?

Nan


-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Will
Sent: Friday, September 25, 2009 11:09 AM
To: thelist at lists.evolt.org
Subject: Re: [thelist] controlling image height in Safari

I'm assuming you can't just change the HTML attribute to 30. Can you try to
add a (gasp) !important to your height declaration and see if that overrides
the html attribute?

if that doesn't work, you might have to resort to JS to change the attribute
directly.

Will

On Thu, Sep 24, 2009 at 12:08 PM, Sarah Adams <sarahwbs at gmail.com> wrote:
> John DeStefano wrote:
>> I'm working with a web application's stock style sheets and trying to 
>> customize a few things.  I'm having trouble getting a logo image's 
>> size to play nicely with Safari, while the size seems to be working 
>> fine in other browsers.
>>
>> In the stylesheet definition for the logo id, I've specified a 
>> distinct height (30px), which is respected by Firefox, but Safari seems
confused:
>> the embedded source shows a height of 33, and the browser's info 
>> tools show a "computed style" height of 30.  I've even tried making 
>> the height !important, with the same results.  Interestingly, 
>> Safari's info tools display a strike-through on the 33px height, but 
>> that's the one that seems to be trumping my specified height anyway 
>> (see attached image, or this link if the attachment get stripped:
>> http://i119.photobucket.com/albums/o151/deesto/web/image-screen.png
>> ).
>
> I'm not really sure what the problem is here. If the computed style 
> height is 30, that's what you want, right? The computed style is the 
> style that is used after the browser calculates which CSS declaration 
> applies. The 33px with the strikethrough shows that that particular 
> declaration (or in this case, html attribute) is being overridden.
> Sounds to me like everything is as it should be, unless what you're 
> seeing is not what's expected.
>
> --
> sarah adams
> web developer & programmer
> http://sarah.designshift.com
> --
>
> * * Please support the community that supports you.  * * 
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester and 
> archives of thelist go to: http://lists.evolt.org Workers of the Web, 
> evolt !
>
-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester and archives
of thelist go to: http://lists.evolt.org Workers of the Web, evolt ! 




More information about the thelist mailing list