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.

HTML Forum


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



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 01-25-2009, 05:39 PM Table problem
Nathand's Avatar
Extreme Talker

Posts: 233
Location: USA
Trades: 0
I am having a problem with a table when I use the <pre> tab to format the cell's content.

Code:
        <table border="0" cellpadding="1" cellspacing="5" style="background-color: #F4F4F4; text-align: left;">
        <td style="background-color: red;">
        <pre>
1
2
        </pre>
        </td>
        <td style="background-color: blue;">
        <pre>
lots of text... columns width being too small doesn't matter
more text is down here
        </pre>
        </td>
        </table>
The cells refuse to be smaller then about 130px? The cell color's were added to make the problem apparent.

Am I misusing the <pre> tag somehow?

Thanks.
Nathand is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-25-2009, 06:54 PM Re: Table problem
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
possibly.

The <pre> element is for displaying <pre>formatted text. What are you trying to use it for?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-26-2009, 02:36 PM Re: Table problem
Nathand's Avatar
Extreme Talker

Posts: 233
Location: USA
Trades: 0
Quote:
Originally Posted by chrishirst View Post
What are you trying to use it for?
I'm trying to display pre-formatted text :P

Actually, what I'm wanting is to be able display code with line numbers on my website, like the "[code]" tag on this forum.
Nathand is offline
Reply With Quote
View Public Profile
 
Old 01-26-2009, 02:42 PM Re: Table problem
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
See there's nothing new here

http://www.webmaster-talk.com/html-f...play-code.html
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-26-2009, 05:15 PM Re: Table problem
Nathand's Avatar
Extreme Talker

Posts: 233
Location: USA
Trades: 0
Thank you! I didn't realize there was actually a "code" tag in HTML. I always thought the forum software parsed the tag and formatted it somehow..
Nathand is offline
Reply With Quote
View Public Profile
 
Old 01-26-2009, 05:38 PM Re: Table problem
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
The <code> element really does the same a <pre> element just with a different look.

the BBcode [code ] delimiters are parsed by the forum software and formatted server side.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Table problem
 

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 1.33413 seconds with 12 queries