PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Problem With Aligning Image Results Icons Using CSS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem With Aligning Image Results Icons Using CSS

    Hello. I am in the process of configuring the CSS search.html using Dreamweaver and I am having a problem with aligning the style for .result_image. I want to align the image icons that I have associated with a file type so that line up to the left on the same line as the result title. By default, they are aligning to the left, but they are not positioning in the top of the column. What am I doing wrong. Here is the code I am using for .result_image and .result_image img:

    .result_image {
    float: left;
    display: table-column;
    vertical-align: top;
    }
    .result_image img {
    margin: 45px;
    width: 46px;
    border: 0px;
    }

  • #2
    You CSS sets the margin to 45 pixels all the way around the image. This naturally causes it to not be positioned to the top (it would be 45 pixels down from the top). Did you mistake this for a height value?

    Removing the "margin:" value you have set should allow the image to be top-aligned.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment

    Working...
    X