Solved

Fixng this CSS - Don't think mine is correct

Posted on 2013-06-22
6
236 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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
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…

759 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now