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
103 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:NeilT
5 Comments
 
LVL 18

Accepted Solution

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

Expert Comment

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

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 33

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:NeilT
ID: 40442313
Thanks all for your comments, this one will suit my needs best :)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now