-
1. Re: Setting img width to 100vw doesn't display properly in Dreamweaver CC
Nancy O. Mar 6, 2014 2:55 PM (in response to MaxxDaemon)What is 100vw?
Try using % instead.
body {
width: 90%;
margin:0 auto;
}
/**this restrains image to it's natural height & width**/
img {max-width:100%}
/**this re-scales image to fit all viewports, some distortion is inevitable**/
img {width:100%}
Nancy O.
-
2. Re: Setting img width to 100vw doesn't display properly in Dreamweaver CC
Ben Pleysier Mar 6, 2014 3:14 PM (in response to MaxxDaemon)Actually, I believe that vw, vh and vmin are font sizing units, so why use on images??? As Nancy says, why not use % for images?
As far as design view is concerned, well yes, you have said it. Reason why someone that uses vw should not have to rely on a broken down design view. In fact, I do not use live view either although it is more reliable. I have a couple of browsers open all the time to monitor my changes.
-
3. Re: Setting img width to 100vw doesn't display properly in Dreamweaver CC
MaxxDaemon Mar 6, 2014 3:20 PM (in response to Nancy O.)100vw is one of a series of CSS3 tags which use the size of the viewport as a guideline rather than the parent container ("vw" stands for "viewport width", "vh" stands for "viewport height").
Using 100% does not suit my needs, unfortunately, but thank you for your response. I'm not looking for a workaround, but rather to correct what appears to be a problem inherent in Drewamweaver itself.
-
4. Re: Setting img width to 100vw doesn't display properly in Dreamweaver CC
Nancy O. Mar 6, 2014 3:40 PM (in response to MaxxDaemon)Before you jump on this for production work, I suggest you read what Chris Coyier has to say about it.
http://css-tricks.com/viewport-sized-typography/
For all practical purposes, it's a very nice idea but this typography unit is still too buggy for the wild.
Nancy O.
-
5. Re: Setting img width to 100vw doesn't display properly in Dreamweaver CC
MaxxDaemon Mar 6, 2014 3:49 PM (in response to Nancy O.)Thank you again for your response, but you really don't understand that I'm not asking to be told not to use a perfectly valid tag. Your suggestion that it's "too buggy for the wild" comes from no personal experience, seeing as how you didn't actually know what the property was when you replied the first time. Only two simple bugs are mentioned in this article, and the article itself is two years old. While I respect your point of view, it is simply not helpful in this matter.
The problems I'm experiencing are not inherent to CSS3; in my original post, I explain that it works fine in a browser and in the live-view. The problem is that Dreamweaver CC offers a drop-down list of various image sizes, and this list includes viewport width and height attributes, yet Dreamweaver itself displays these attributes incorrectly.
-
6. Re: Setting img width to 100vw doesn't display properly in Dreamweaver CC
Nancy O. Mar 6, 2014 4:13 PM (in response to MaxxDaemon)IMO, Viewport Units for typography have a ways to go yet. If you can live with that, feel free to use them for your typography. http://caniuse.com/viewport-units
In the meantime, Dreamweaver isn't a browser. Design View has never been 100% reliable at rendering advanced CSS like gradients, SVG, rem, or anything that relied on browser-prefixes. It stands to reason, it's not going to be able to render Viewport Units either. That's why we have Live View .
Nancy O.


