

This will force all images to be the same size as the container. The simple fix then is to use a conditional comment targeting IE6 and then set the width to 100%. IE6 doesn’t support max-width, but it treats the width property similar to max-width.

IE6 is finally falling out of use so it’s up to you whether or not it’s worth supporting. It may also not be much of a problem depending on your site. The above doesn’t quite work everywhere.įirst up is IE6, which probably isn’t any surprise. This is all seeming too easy isn’t it? Unfortunately we’re not there yet.
Dw cc fluid image width how to#
We already know how to keep elements from growing too large and that’s through the max-width propertyĪnd we’re done. Let’s consider the case where the image is larger than its container. However in all other cases it will either be too large or too small for the layout. Unfortunately this fixes the image size and is completely inflexible.Īt one specific point the absolutely fixed image is probably the perfect size. Typically when adding an image to a web page we set a width and height using absolute measurements like ‘px’. I also highly recommend Ethan’s new book on responsive design.Īlso Richard Rutter has set up a page experimenting with flexible images using max-width that’s worth checking out. We’re building toward responsive layouts by discussing each of the 3 parts necessary for responsive design in a separate post.Īll the credit here belongs to Ethan Marcotte and I recommend his post on flexible images. Last week we talked about elastic layouts and flexible grids. Text easily reflows as it’s container resizes, but what about images and other media? How do we make them flexible to keep our layout flexible? This main.css file contains the CSS (styling) that contains the main formatting for the elements on your page.A flexible layout isn’t all that flexible if some of the component parts are fixed.

The columns are just visual and won’t appear when the site is viewed out there in the wild. There are also a set number of columns for each device that you can edit-it’s your call. Each device has a set width, in percent (%), that you can edit if you like. In the New Document dialog box, select the Fluid Grid Layout category on the left.ĭreamweaver, like lots of templates and boilerplates that are starting points for responsive design, break down the number of devices to three: phone, tablet, and desktop. With the site created, you can create your first responsive site file. To begin with, you probably want to create a site file (Site > New Site or other methods). So let’s jump into creating a responsive layout in Dreamweaver CC using fluid grid layouts. Figure 1 Fluid grid layouts in Dreamweaver CC Start with Fluid Grid Layouts in Dreamweaver CC
