Dimensions of the image in CSS or HTML; or a little of both?

I ask this because I have a site with several pages with small images that illustrate the text is floated to the left or to the right.  I want each image to the same width, but not the same height.  I want to use the CSS even or insofar as possible, with each left or each image on the right.

I usually try not to declare the width in the HTML, but put it in the CSS.  Y at - there much difference?

A compromise might be to declare the width in CSS and height in the HTML code.  That seems OK, but I just want to check if there is a good way to achieve what I'm after.

Thank you

Martin

martcol wrote:

Hello PZ

I guess that the question is is not should I put the width/height but what would be the most economical solution in my situation.

I have 4 small images on my page.  Two float left and right two floats.  All images have the same width but of different heights.

The pictures on the left are in a

and the law in their own so that I can have one rule to the left or right with the float, but I have different rules to cover the height of the image.

So I can take the width of the image in the HTML code and which cover in my CSS.  I had always assumed that the best way to go was to keep your HTML code as light as possible.  If I cover the width of the image in these two rules, I have either:

(1) write a rule for each image cover the unique height and put an id on each image in the HTML code

(2) return all statements of height/width in the HTML

(3) put the width in CSS and height in the HTML code

Or go drink a glass of red wine!

Martin

Hmm... for me, I would like to always the width and height in the html code. I think you can become a little obsessive, trying to keep the HTML as light as possible. Also if I need to change the width/height of the image at any time its easier in the HTML to go look in the css rules.

Tags: Dreamweaver

Similar Questions

  • Recommended image size and the dimensions of the images on the retina of the iPad?

    What are the recommended dpi of the image size and the dimensions of the images designed in such DPS displayed on a retina iPad app?

    Take a look at the following link:

    http://blogs.Adobe.com/indesigndocs/2012/03/guidelines-for-creating-folios-for-iPad-3.html

  • Cannot show the dimensions of the image on a Mac?

    Hello

    I know in the 'Pictures' folder, you can select "Show view options" and then "view info point" and it will show dimensions photo... but it is not possible in a different directory, not to mention that the pictures folder?

    I photograph weddings for a living, and I'm fairly new to mac. Naturally, all my images are stored on external drives... I don't see the dimensions of the image? It seems that I have to open each image individually within the preview, and then press CTRL + I to see! Please tell me I'm wrong.

    4 K - end iMac 2014

    You can right-click (command-click a button or the trackpads) on the image file and select information.

    The title of the chapter more information, one of the entries is dimensions

    Alternatively, if you set the display of the viewfinder to the list, is one of the optional columns to Dimensions. Command-click on the column headers to add or remove columns.

  • Increase the physical dimensions of the image in high resolution?

    I have an image I want to use in a video, if it is not physically large enough to fill the dimensions of 1920 x 1080 video, she has a resolution of 300ppi and video needs only 72 dpi. How to take advantage of the fact that it's an image high definition and increase the physical dimensions of the image? Is there a way to do this?

    Thank you.

    If you are told that you should print at 4 inches by 6 inches at 300 dpi, follow these steps:

    • Choose Image - Image size.
    • Check the box resampling .
    • In the resolution box, type 300 .
    • Put 4 to 6 inches in the height and Width boxes (or vice versa if it's a bitmap portrait).

    You will find yourself with an image 1200 x 1800 pixels that will be printed at 4 by 6 inches, your goal of printing at 300 ppi.

    Printing will be probably not as sharp and detailed as if you had printed at 4 by 6 inches without downsampling at 300 ppi.

    You will do well to try to begin to understand how the images are expressed in pixels, and why the above is true, while in the future, you will know when the issue of the requirements.  This thread you might also like:

    http://forums.Adobe.com/thread/975142?TSTART=30

    -Christmas

  • Preserve the dimensions of the image

    Hi I'm going to do for ID ACE exam

    Studied by far - and I am not happy with the option «size of image preseve»

    This is a practical question on from adobe (with response)

    4.1 based on a given scenario, determine the best settings to choose and place an image


    You want to replace an image from a selected photo. The new image is larger than the original
    image. You want the new image to import the same percentage of scale than the original.
    What should you do?

    A. press and hold the SHIFT key when you click on the button repeat the link in the links Panel
    B. hold down the Option/Alt key when you click the Update button in the links Panel
    C. before you replace the image, deselect preserve Image Dimensions when reissue of links in the
    Part of the file handling Preferences dialog box
    D. before you replace the image, select keep Image Dimensions when reissue of links in the file
    Part of the handling Preferences dialog box

    Correct answer: C

    BUT it says this in the help file

    Choose how relinked graphics are set to scale

    When you relink to replace a chart with a different source file, you can keep the dimensions of the image of the file that is being replaced, or you can view the file in its real dimensions.

    1. Choose Edition > Preferences > File Handling (Windows) or InDesign > Preferences > File Handling (Mac OS).

    2. Choose preserve Image Dimensions when reissue of links if you want images to appear at the same size as the images that they replace you. Deselect this option to have relinked images appear at their actual size

    Is this a contradiction or am I be thick

    Thank you

    80 and 80.4 are quite close. I wonder if the difference could be due to a problem of resolution requiring an adjustment to get a complete pixel, well que.4 mm is quite large in this respect. Are you patched to 6.0.4?

  • How to move a logo on the right side of the header and resize the area of the image - sensitive custom Layout HTML 5 - 11 of RoboHelp

    I created a page HTML 5 custom based on the layout Theme1_Standard layout.  Our logo is rectangular and does not fit in the default image area.  I want the logo to the right of the header.  I don't see how to do this in the customization of the Layout dialog box.  Is there a way to do this in the HTML somehow?  Moreover, the logo looks great in the office and the table overview of the customization of the Layout dialog box.  It is the right size and the header title fits right so that there is enough space for the rectangular logo. However, in the preview of the phone, the logo is tiny.  And when I generate the layout of reactive source HTML5 with the new theme, the logo is tiny in the preview of Chrome, even for the office.

    Thank you.

    Gina

    You can change this behavior in the main.css file. It's a little more work that you know well;

    Open the file with a text editor and search for "table.headertable td.logo". You can find parameters for the width of the logo, something like:

    Width: 4;

    Simply make it wider to adjust the image. Note that you need to do this several times as several devices have different widths for the logo.

    Kind regards

    Willam

  • Dimensions of the image

    I do not understand the dimensions of the preview image. What number is the height?

    First number is the width, the second height.

  • DisplayImageFile() does not change the dimensions of the image control

    Hello

    I put in an image with DisplayImageFile() control image + assigning to the attribute of control ATTR_FIT_MODE = VAL_SIZE_TO_IMAGE. The image size is larger, then the size of the control and I want the control to resize to the size of the image.

    It works fine except when I ask the dimensions of the control with GetCtrlAttribute (panel, control, ATTR_HEIGHT, & height), I get the original size (before calling DisplayImageFile())...

    It seems I missed something basic...

    Environment: LAB Windows CVI 2012, Windows 7

    Thanks in advance

    Ramy

    I don't know if you still experience this problem or not, but I came across this discussion now and wanted to point out that this could happen if your picture controls if it is covered by another control or is it hidden altogether (and there might be other similar situations that I can't think of right now).

    When this happens, the CVI runtime can pull the image directly on the image. Instead, he plans an asynchronous action that will redraw this section of the Panel from the back to the front (if it's just overlapped, not hidden). It is only in the later action that the image is applied to the control, and it is only then that the control is resized to fit the image. This may seem immediate to the casual observer, but, because it is asynchronous, you can't try to get new size immediately after calling DisplayImageFile, because the image is not yet in control at that moment.

    Ironically, this occurs only if the control has already been set to the image size at the time you call DisplayImageFile. If this isn't the case, then the new size is applied when you later change the mode made programmatically. Whereas if the adjustment mode has been already updated the image size, trying to programmatically set the same value of the image size has no effect and nothing happens then.

    If this is what is happening, one way around this would be to call ProcessDrawEvents or ProcessSystemEvents immediately after the call to DisplayImageFile. Unless the control or Panel has been hidden way explicit, which will require the drawing action will take place at this time, and you should then be able to get the new size of control at any time after that.

    Luis

  • How can I unlock the dimensions of the image

    Somehow my pixel dimensions and the dimensions of the document were being blocked and when I try to crop a cropped image dimensions remain in the same proportions of width to the size as the original. There are few symbols and brackets to the right of pixels and inches.  I don't know how to remove these.  I use an archaic version of the Photoshop Elements - version 2.0 on a Mac running 10.4.11.

    2012-08-17 05.30.13 pm.jpg

    As far as I remember, your crop tool has its own small boxes for sizes above in the box options when you use it.  Uncheck THOSE (there is even a [Clear] button) to get rid of the lock proportions there.

    -Christmas

  • Does not display the images and CSS does not work generated WebHelp

    Hi all

    I have two issues which I believe are related. It miss me probably a simple step somewhere, since I can't find this issue covered in the forum or help.

    We have just upgraded to RH7 to RH9. When I build a project to test, the CSS was fate not (it was connected properly in the topics of the project, but he was not released when the WebHelp has been generated). Trying to open the CSS file directly led to a 404 error.

    I was able to solve that by checking the "Apply to all" button and selecting the CSS file we use (see image). However, none of our lists - ordered and unordered - are properly formatted. The font and size of numbered lists is incorrect, lists all nested lists display with numbers, even if they are not ordained and autonomous bulleted lists use evenly filled as circles dig balls, where previously they used the small squares, circles, or a picture of triangle. The CSS is called correctly in the subject, lists are formatted to use the styles and the styles are in the style sheet, so I do not know what causes this problem. So far, I have not noticed any other styles does not, but those are the ones that stand out.

    WebHelp Settings (CSS).png

    The other problem is with the images. This problem appears in both our WebHelp generated and in the printed documentation. The images are not output. In WebHelp, the text appears (typically the name of the file). in the printed documentation, nothing appears. (I checked all the printed documents that "embedded" is selected, but as far as I know, there isn't a similar function for the WebHelp).

    What Miss me? Thanks in advance for any help!

    Source code control is involved?

    So you can see the CSS in the project manager and it works very well in the design editor but does not every time that you build for. Can you just build or generate and publish? You use Windows Explorer to check the CSS in both places?

    How do you get a 404 error? This happens when you click on a link where the target does not exist. Normally you would use Windows Explorer to locate the CSS.

    Lists are a known problem on upgrade from 7. See the lists on my site.

    The images show in the project manager?

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • Possible to determine the dimensions of the image to download cffile?

    Hello

    Is it possible to determine the pixel dimensions of an image jpg or gif file which has been downloaded using cffile?

    Kind regards
    Greg

    or...


    imgFile = createObject("java","javax.swing.ImageIcon").init("#image_name#");
    imgFile.getImage ();
    w = imgFile.getIconWidth ();
    h = imgFile.getIconHeight ();

    width = "" #w # "height =" #h #.

    Adjust the code accordingly to what you do.

  • Dimensions of the Image App for v5.0.0.328

    Hi all

    I don't know if anyone else has encountered this problem before.  I tried to search this forum and others, but no one mentioned it yet. I have a BB Storm 9530 and recently upgraded the operating system to 5.0.0.32 8.

    The app I'm developing detects the value of HomeScreen.getPreferredIconHeight () and HomeScreen.getPreferredIconWidth () and figures what icon to use. Based on this list of devices and the dimensions of this url

    http://docs.BlackBerry.com/en/developers/deliverables/6625/Dimensions_for_screens_images_and_icons_4...

    the dimensions of the icon on the homescreen for the storm is 73 x 73.

    The app pulled up to the icon of evil with the operating system set to day, so I did a bit of debugging to see what has changed. I discovered that the value of preferredIconHeight is 70 instead of 73. I also tested this point on the 9530 with 5.0.0.32 Simulator 8, and I get the same result. I was wondering if the dimensions of the favorite icon changed with the new OS - so if I need to update my code to keep account of the change. I have not seen anywhere that the dimensions have changed, then maybe I'm picking up on the dimensions wrong somehow?

    Thank you!

    Hello

    Sorry it took me a while to answer this.  I got a response from the BlackBerry Support on this subject. There was a problem with the HomeScreen.getPreferredIconHeight () method. This will be fixed in a future release. 73 x 73 is the resolution of the correct icon.

    Thanks for your help,

    Shirwah

  • Dimensions of the image change when I import it to my composition?

    I am fairly new to After Effects if this is probably an easy fix that I'm just not aware.  For some reason any when I create an image of 1920 x 1080 in Photoshop, then the tool in After Effects, the image seems to be scaled down as if it is greater than the size of the publication, despite my Photoshop image and my publication in 1920 x 1080 size.  Y at - it an explanation for that?

    Thank you!

    In after Effects: check Composition-> Composition Pixel Aspect Ratio settings is set to square Pixels

  • Could not get the image BG CSS placement to work

    Hi - I'm personalize this card in DW:

    http://designerandpublisher.com/jqmaps/quick/quick2/index2.html

    The logo at the top left in the blue BG is supposed to be in the lower right of the blue box as in the example below:

    box.jpg

    I have the CSS defined like this:

    .cnttwo .box{background: url ("http://designerandpublisher.com/jqmaps/quick/images/noaa-corner-logo.png") no-repeat;} 709px 333px; overflow: hidden; }

    .. .but for some reason, the logo moves to the bottom right where I want to.  Can someone tell me what I am doing wrong?

    Thank you - guy deaf

    I hope that css just stuck in the forum strangely, otherwise it is enough hurt badly formed. This is the correct structure for css...

    . Box {: value of the attribute, attribute: value ;}}

    .cnttwo {: value of the attribute, attribute: value ;}}

    If you want to as two distinct categories, or...

    . Box, .cnttwo {attribute value:;: value of attribute :}}

    If you want two classes with the same sets of attribute value:. If you want to insert an element in a given class, which is inside the other with a given class, you need two classes on the same line, like this...

    .cnttwo .box {: value of the attribute, attribute: value ;}}

    Also, you have a problem in your background shortcut (after rehearsal no semi colon), see this link on how to use the background shorthand property...

    CSS background property

  • How to integrate the image in css for resusability source?

    Hello

    I had a lot of icons for application and currently its embedded in the script tag

    for example: in my script tag, I

    [Embed(source="/assets/icons/save_it_icon.png")]
    [Bindable]
    private var saveIcon: Class;

    in my flex component

    < mx:Image id = "savePaneImg".
    source = "{saveIcon}.
    buttonMode = "true".
    toolTip = "save comments".
    Click = "doSave (); "/ >

    How can I move this image to resusability source in the file css across different components?

    Thank you

    Kind regards

    Annick

    Hi Rudy,.

    You can do the same as well in css... as below... See sampl styles applied to the tab control...

    Tab.modifyTab

    {

    selectedDownSkin: Embed (source = ""... / pictures/tab_first.png ' ");

    selectedOverSkin: Embed (source = ""... / pictures/tab_first.png ' ");

    selectedUpSkin: Embed (source = ""... / pictures/tab_first.png ' ");

    overSkin: Embed (source = ""... / pictures/tab_first.png ' ");

    upSkin: Embed (source = ""... / pictures/tab_first.png ' ");

    }

    I suggest you use button instead of a picture control... control so that you have more control you need click functionality...

    So, you can use the same to your goal...


    Click = "doSave (); "/ >

    and your css is as shown below:

    .saveIcon

    {

    upSkin:Embed(source="/assets/icons/save_it_icon.png");

    upSkin:Embed(source="/assets/icons/save_it_icon.png");

    overSkin:Embed(source="/assets/icons/save_it_icon.png");

    downSkin:Embed(source="/assets/icons/save_it_icon.png");

    disabledSkin:Embed(source="/assets/icons/save_it_icon.png");

    }

    You can use different images for different States of the button...

    If this post answers your question or assistance, please mark it as such.

    Thank you

    Jean Claude Chari

Maybe you are looking for

  • After an automatic update of firefox 23, wlecome to firefox / page Android still open

    The automatic update is the update for Firefox 23 several days ago. Since then, when I open Firefox control compatibility module runs before opens Firefox and Firefox always opens on the welcome page in Firefox that wants connect me my PC with an And

  • Satellite P750-11W - two disruptive noises

    Hi allI recently bought a Satellite P750-11W. The problem is * two noises * make this laptop. Without a/c, on the one hand, there is a static * whistle sound *, the other a * buzzing noise * that noise when scrolling upward or down on a Web site for

  • Windows Vista Home Premium - how to move sidebar?

    I recently had my laptop repairs - Windows Vista Home Premium SP2 how to place the sidebar on when I get the message "windows sidebar is managed by your system administrator" I am the system administrator, can anyone help? Click Start, all programs,

  • Switch SRW224G4P doesn't work anymore - leds blink normally

    Hello firstly, hope you have patience with another guy again. During the last two days, I had problems with the switch SRW224G4P. When normally connected to the network (among other switches), it does not ping and it does not switch packets (computer

  • Downgrade from Windows Vista

    Hi, I recently bought a computer Windows Vista of the store a few weeks ago. I used it and it was working fine and I did the work on this subject. I went to do something else for about two days and I'll be back, and it's on Windows 7. This fact has a