Stars out of place


Since I adapted my main pages to be mobile-friendly, IE9 started displaying them with a problem:

The stars that appear in the same line as the name of the hotels are dropping to the next line, and in one particular case, the last in the following page, the 2 stars are not right floated.

All other browsers disply the pages properly. I guess that the reason may be the width of the central column, but I’ve played around with it, to no avail.

I know that IE9 has been superseded by IE10 and IE11, but I assume that if I test in IE9 the others are backward-compatible.

It’s not just IE9, Chrome also is messed up.

Those clearing divs you have in the HTML…they need to be clear:both; and not just clear:left;.

The reason it needs to be clear:both; is because those stars are floated right. You need the next hotel to be cleared from all previous floats, not just the ones floated left.

Not a fan of that HTML though - I see loads of extra elements and uncleared floats. You don’t even need specific clearing elements in your HTML…but that’s another topic for another day though. For now, just make those clearing elements in your HTML clear:both;.

Hi Ryan


Interestingly, I did not have any problems with Chrome. Computers are funny!

I am confused over this clear business. In the css there is a div .clear with {clear:both} Should that not do the trick, or does the html override?

You had style=“clear:left;”. No class was applied to those elements. Just inline CSS (bad!)

Shoudl I replace all those lines

<div style="clear: both;"></div>


<div class="clear">

Yes. That would be a start to help tidy up your c ode.

That .clear{} would need clear:both; on it.

Itr’s there already in the css

.clear {
    clear: both;

Good. All issues done then?

Over & out!

Many thanks

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.