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

x
?
Solved

Fixng this CSS - Don't think mine is correct

Posted on 2013-06-22
6
Medium Priority
?
252 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
  • 4
  • 2
6 Comments
 
LVL 15

Accepted Solution

by:
Jagadishwor Dulal earned 2000 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
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!

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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 Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
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…
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