Solved

Fixng this CSS - Don't think mine is correct

Posted on 2013-06-22
6
242 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 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
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 define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

820 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