?
Solved

vertical align  -baseline

Posted on 2009-05-12
5
Medium Priority
?
460 Views
Last Modified: 2012-05-06
hi - i need all of the content within the blue block to align at the bottom of the orange block so all of the "Artwork Piece Number 1"s line up:

http://ctemps.cjehost.com/thumbs2.php

below is the html - here's the 2 styles that im trying to tweak with "vertical-align:baseline" (and bottom) can't get either to work though  thanks!

.boxPadThumb{/*oh well! looks like you need to adjust both!*/
      padding:0 5px 16px 16px;
      float:right;
      min-height:200px;
      background:#FF9966;
      vertical-align:baseline;
      }

.fourColBox{
width:125px;
min-height:150px;
vertical-align:baseline;
float:left;
margin-left:0;
background:#00CCCC;
}


<div class="boxPadThumb"><!---begin thumb box-->
						<div class="fourColBox">
							<div class="img-shadow"><a href="#" class="imgOver"><img src="images/fpo_thumb_num3.jpg" border="0" /></a>
							</div>
							<div class="clr"></div>
<div  class="iconCTN">
							<div class="iconCart"><a href="#"><img src="images/cart_icon.gif" border="0" /></a></div>
							<div class="iconQuickView"><a href="#"><img src="images/quick_view_icon.gif" border="0" /></a></div>
						</div>
						<div class="thumbCaption">Artwork Piece Number 1</div>
						</div>
					<!---end thumb box--></div>

Open in new window

0
Comment
Question by:phillystyle123
[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
  • 3
  • 2
5 Comments
 
LVL 42

Accepted Solution

by:
David S. earned 2000 total points
ID: 24369530
vertical-align doesn't apply to floated elements.  Use display:inline-block instead (with the workarounds for IE5-7 and FF1-2):

http://www.dynamicsitesolutions.com/css/example-menus/4/
http://gtwebdev.com/workshop/layout/inline-block-gallery.php
0
 

Author Comment

by:phillystyle123
ID: 24369881
i don't get it - so i can't use

.thumbRow{
width:100%;
float:left;
vertical-align:bottom;
background:#00FFFF;
}

i don't get how using display:inline would help
0
 
LVL 42

Expert Comment

by:David S.
ID: 24369957
vertical-align only applies to table-cells and inline elements. A floated element is neither.

display:inline-block is not the same as display:inline. display:inline-block allows you to have an element that can have a set width and height and yet participate in line-box formatting like inline elements do.
0
 

Author Comment

by:phillystyle123
ID: 24370181
hmm - i'm still not getting this -

check it out:

http://ctemps.cjehost.com/thumbs2.php

i notice that if i use position:relative; instead of float:right: i start to get the desired effect -however, it only works in ff - what am i missing - i'm trying to get all of teh green boxes to vertical-align:baseline;


.boxPadThumb{/*oh well! looks like you need to adjust both!*/
	padding:0 15px 0 15px;
	float:right;
	display:inline-block;
    vertical-align:baseline;
	margin-bottom:0;
	background:#00FF00;
	}

Open in new window

0
 
LVL 42

Expert Comment

by:David S.
ID: 24370285
Remove the float:right declaration.

It's not as simple as just adding display:inline-block. Take a look at the code used in the examples I linked to in my first reply.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
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…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses
Course of the Month12 days, 8 hours left to enroll

777 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