Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

vertical align  -baseline

Posted on 2009-05-12
5
Medium Priority
?
461 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 43

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 43

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 43

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

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

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
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 tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
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

604 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