Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
135 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
5 Comments
 
LVL 19

Accepted Solution

by:
Greg Alexander earned 2000 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 10

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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.
This article discusses four methods for overlaying images in a container on a web page
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 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…
Suggested Courses

824 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