Solved

CSS floats, how can I get these to line up (ie left float up a bit) when the left/right column is bigger thatn its neighbour

Posted on 2014-11-13
5
114 Views
Last Modified: 2014-11-14
I have a list of links which fit together nicely but when some are bigger they obviously increase the min-height of the others and drop the next floated item down.

original
Is there any way I can get any that wrap over and leave a gap to "shift upwards" to keep everything neat? a bit like this...

required
0
Comment
Question by:Neil Thompson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 19

Accepted Solution

by:
Greg Alexander earned 500 total points
ID: 40441384
0
 
LVL 19

Expert Comment

by:Greg Alexander
ID: 40441388
Or you could just run the items down two independent columns.
0
 
LVL 9

Expert Comment

by:Brandon Lyon
ID: 40441583
Depending on your required browser support you can:

Use javascript as the previous poster mentioned
Use  HTML tables
Try some of the new CSS3 features like column layouts : How to use CSS3 columns
0
 
LVL 34

Expert Comment

by:Slick812
ID: 40441607
According to the developers for the firefox browser, you should NOT use the CSS float as a method to to allow non concerned alignment, you may find that using the  CSS  display:inline-block;  gives a more correct relative positioning, however as all browser output, there will still be alignment PER LINE, the display shown in your second PNG image, does not have a PER LINE alignment, so a two column approach, as galexander07 suggested, might be the way to get that visual display.

Can you show us the HTML and CSS you use for your output, then we can have a better idea of what to do for a better end result.
0
 
LVL 3

Author Closing Comment

by:Neil Thompson
ID: 40442313
Thanks all for your comments, this one will suit my needs best :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question