HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 5th, 2008, 07:05 PM
mck9235 mck9235 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 31 mck9235 User rank is Lance Corporal (50 - 100 Reputation Level)mck9235 User rank is Lance Corporal (50 - 100 Reputation Level)mck9235 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 6 h 18 sec
Reputation Power: 4
Table display trouble

Hi, I know my title is a little vague, but I'll try to explain more thoroughly below.

I'm trying to build a small HTML template that looks like the below image:


Right now, my image on the left causes the text to jump down, or the next template (it repeats) is not cleanly on the next line.

Is it best to use a table for something like this or divs? It will be repeating 5-6 times. Thanks for any help you guys might have!

Reply With Quote
  #2  
Old May 5th, 2008, 11:05 PM
essee essee is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 82 essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 7 h 27 m 10 sec
Reputation Power: 12
It's kind of hard to tell what's happening without the code.
Sounds like an overflow issue, maybe?

Post the code and it'll be a lot easier.

And I'd use a div to contain each. Tables are so last century
No, tables should be used for what they were designed - tabular data.

Reply With Quote
  #3  
Old May 5th, 2008, 11:06 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Click here for more information.
 
Join Date: Jul 2004
Location: USA
Posts: 15,149 Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 2 Weeks 2 Days 2 h 47 m 18 sec
Reputation Power: 1294
That's not tabular data, so no, it's not best to use a <table> for that.

I suggest you learn how semantics apply to X/HTML. Semantics is really a very important subject when it comes to X/HTML.

I might use an unordered list (<ul>) and for each item a header, e.g. <h2>, and some <p>s to mark that up.

Would you like me to move this thread to the CSS forum for you?
__________________
Spreading knowledge, one newbie at a time.

Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions

IE7: the generation 7 browser new in a world of generation 8 browsers.
Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

Reply With Quote
  #4  
Old May 6th, 2008, 03:34 PM
mck9235 mck9235 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 31 mck9235 User rank is Lance Corporal (50 - 100 Reputation Level)mck9235 User rank is Lance Corporal (50 - 100 Reputation Level)mck9235 User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 6 h 18 sec
Reputation Power: 4
Thanks for the replies -- I guess I'll go with divs, but if you would be so kind as to take a look at my code:
Code:
<style type='text/css'>
.specialBox
{
	font-family:Arial, sans;
	font-size:12px;
	width:420px;

}
img
{
	float:left;
	width:200px;
}
.specialBoxContent
{
	float:left;
}
</style>
				<div class='specialBox'>
		<img alt='Orange Juice' src='http://clients.122blue.com/joe//images/orange_juice.jpg' /><br /><div class='specialBoxContent'><h3>Tropicana Orange Juice</h3>
		Item #324<br />
		Now only $7.5 (save $5.25)<br />
		<strong>This product includes the following:</strong><br />
		This is <span style='color:red;'>Tropicana</span> Orange juice!  <strong>Horrah!</strong><br /><br />

		One 64 oz bottle to be delivered via UPS.  <br />
		<input type='button' stlye='float:right;' value='Buy Me' /></div>
	</div>
		
			<div class='specialBox'>
		<img alt='Apple Juice' src='http://clients.122blue.com/joe//images/applejuice.jpg' /><br /><div class='specialBoxContent'><h3>Apple Juice</h3>
		Item #54<br />
		Now only $8.5 (save $2.5)<br />

		<strong>This product includes the following:</strong><br />
		This is some very tasty, very healthy, and very awesome Apple juice!<br /><br />
		Get your <span style='color:green'>Apple</span> juice now!<br />
		<input type='button' stlye='float:right;' value='Buy!' /></div>
	</div>

You can see it at: http://clients.122blue.com/joe/index.php/main/listing/12. Any help would be awesome! Thanks

EDIT: For the above code, the first "box" is right, but the second one gets messed up for some reason, it doesn't cleanly break.

Reply With Quote
  #5  
Old May 6th, 2008, 03:43 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Click here for more information.
 
Join Date: Jul 2004
Location: USA
Posts: 15,149 Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 2 Weeks 2 Days 2 h 47 m 18 sec
Reputation Power: 1294
You're welcome

1) Use valid code and don't forget a doctype.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
<style type='text/css'>
.specialBox
{
	font-family:Arial, sans;
	font-size:12px;
	width:420px;

}
img
{
	float:left;
	width:200px;
}
.specialBoxContent
{
	float:left;
}
</style>
</head>
<body>

				<div class='specialBox'>
		<img alt='Orange Juice' src='http://clients.122blue.com/joe//images/orange_juice.jpg'><br><div class='specialBoxContent'><h3>Tropicana Orange Juice</h3>
		Item #324<br>
		Now only $7.5 (save $5.25)<br>
		<strong>This product includes the following:</strong><br>
		This is <span style='color:red;'>Tropicana</span> Orange juice!  <strong>Horrah!</strong><br><br>

		One 64 oz bottle to be delivered via UPS.  <br>
		<input type='button' stlye='float:right;' value='Buy Me'></div>
	</div>
		
			<div class='specialBox'>
		<img alt='Apple Juice' src='http://clients.122blue.com/joe//images/applejuice.jpg'><br><div class='specialBoxContent'><h3>Apple Juice</h3>
		Item #54<br>
		Now only $8.5 (save $2.5)<br>

		<strong>This product includes the following:</strong><br>
		This is some very tasty, very healthy, and very awesome Apple juice!<br><br>
		Get your <span style='color:green'>Apple</span> juice now!<br>
		<input type='button' stlye='float:right;' value='Buy!'></div>
	</div>

</body>
</html>

2) You're using an awful lot of <br>s. You definitely don't need the one after each <img>.

3) Don't forget to test in good browsers like Firefox, Safari, and Opera.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Table display trouble


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway