Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Coverting tables to CSS
Old 07-17-2007, 01:04 AM Coverting tables to CSS
Super Talker

Posts: 122
Name: Nate
Location: Orlando, FL
Trades: 0
What would be the best way to convert this code to CSS:

HTML Code:
<table width="100%" border="0">
  <tr>
    <td width="50%">image goes here</td>
    <td width="50%">description goes here</td>
  </tr>
</table>
Two columns...left column contains a picture, right column contains a description.
NateL is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-17-2007, 11:26 AM Re: Coverting tables to CSS
Angelosanto's Avatar
Webmaster Talker

Posts: 548
Name: Danny Angelosanto
Trades: 0
It depends - if this is one out of a whole load of images with descriptions, then an unordered list would be best. If its just the one, then divs would be better
__________________
"The only reason some people get lost in thought is because it's unfamiliar territory."
_____________________________________
Angelosanto is offline
Reply With Quote
View Public Profile Visit Angelosanto's homepage!
 
Old 07-19-2007, 07:09 AM Re: Coverting tables to CSS
crandall87's Avatar
Experienced Talker

Posts: 40
Trades: 0
Replace width="100%" border="0" with style="width:100%;border:none;"
__________________

Please login or register to view this content. Registration is FREE
crandall87 is offline
Reply With Quote
View Public Profile
 
Old 07-19-2007, 11:58 AM Re: Coverting tables to CSS
angele803's Avatar
Perfectly Imperfect

Posts: 1,774
Name: Stephanie
Location: Oklahoma
Trades: 2
You could use definition lists for this.
Code:
<dl>
<dt>image goes here</dt>
<dd>Description goes here</dd>
</dl>
Then your CSS could look something like this
Code:
dt {
    width:50%;
    float: left;
    }

dd {
     width:50%;
     }
angele803 is offline
Reply With Quote
View Public Profile
 
Old 07-19-2007, 01:06 PM Re: Coverting tables to CSS
xprmnt's Avatar
Extreme Talker

Posts: 212
Name: GiorgosK
Location: Geoland.org - Greece
Trades: 0
it could be done lots of different ways depending on the rest of the page layout but here is a start

Quote:
<html>
<head>
<style type="text/css">
div#ourdiv div {width:50%;display:inline;}
</style>
</head>
<body>
<div id="ourdiv">
<div>image goes here</div>
<span>description goes here</span>
</div>
</body>
</html>
__________________
GiorgosK
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
xprmnt is offline
Reply With Quote
View Public Profile Visit xprmnt's homepage!
 
Old 07-19-2007, 04:10 PM Re: Coverting tables to CSS
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
I would drop the useless <span> though. Description should be in a <p></p> tag and then you can style the <p> itself. Saves adding repetitive spans all over the place.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 07-20-2007, 08:43 AM Re: Coverting tables to CSS
xprmnt's Avatar
Extreme Talker

Posts: 212
Name: GiorgosK
Location: Geoland.org - Greece
Trades: 0
Yes LadyNred droping the span would probably work,
I was just trying to give a skeleton he/she could work with ...
__________________
GiorgosK
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
xprmnt is offline
Reply With Quote
View Public Profile Visit xprmnt's homepage!
 
Reply     « Reply to Coverting tables to CSS
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.39119 seconds with 12 queries