Solved

Fixng this CSS - Don't think mine is correct

Posted on 2013-06-22
6
246 Views
Last Modified: 2013-06-22
I have a div "details" with 3 columns. I used divs to organize the 3 columns.  But I don't the way i have it is correct..what if one of the texts is longer...i think the way i have will mess it up if..for example, the first-last name is longer. I have my example here

http://jsfiddle.net/Vjdrz/2/
0
Comment
Question by:Camillia
[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
  • 4
  • 2
6 Comments
 
LVL 15

Accepted Solution

by:
Jagadishwor Dulal earned 500 total points
ID: 39268810
You are doing lots of mistake to manage columns you need it divided in to three different columns and each individual columns will contain it's own text manage your height and width as your required. see the example below:

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
.details {
	padding-bottom: 15px;
	background-color: #F5F5F5;
	font-size: 11px;
	height:80px;
}
.details .cols{
	width:300px;
	float:left;
	margin-left:20px;
}
.details .cols .title{font-weight:bold;}
.clear{clear:both;}
</style>
</head>

<body>
<div class="details">
			    
				<div class="cols">
                	<div class="title">Billing Address:</div>
                        <p>Johnny wasa<br>
                        782 Westwind Ct<br>
                        Vallery Lane, MO 630991-1556<br>
                        United States</p>
                </div> 
				<div class="cols">
                	<div class="title">Payment Method:</div>
                        <p>Credit Card $96.21<br>
                        *************1111</p>
                </div>
                <div class="cols">
                	<div class="title">eGift/Gift Card(s) </div>
                        <p> </p>
                </div>
			</div>
</body>
</html>

Open in new window

0
 
LVL 7

Author Comment

by:Camillia
ID: 39268817
thanks, let me try
0
 
LVL 7

Author Comment

by:Camillia
ID: 39268844
It has to be 3 columns but this is one column with 3 rows

http://jsfiddle.net/Vjdrz/3/

so it should be

Billing Address:              Payment Method:                          Gift/Card..:
address here                    payment stuff here                        stuff here
0
Independent Software Vendors: 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!

 
LVL 15

Expert Comment

by:Jagadishwor Dulal
ID: 39268859
Nope its three columns increase the size of jsfiddle or test it in a page see my image here:
Preview
0
 
LVL 7

Author Comment

by:Camillia
ID: 39268860
you're right. Let me try it in my code now.
0
 
LVL 7

Author Comment

by:Camillia
ID: 39268881
you're the best. Thanks for helping.
0

Featured Post

Technology Partners: 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

This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Suggested Courses

623 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