MajorGeeks Support Forums IOBit Software

Go Back   MajorGeeks Support Forums > Majorgeeks.Com - Support Forums > Programming
Register FAQ Members List Calendar Casino Mark Forums Read

Programming Place to discuss programming including HTML, Java, C++, MySQL and others.


Reply
 
Thread Tools Display Modes
  #1  
Old 06-11-12, 10:40
Spock96's Avatar
Spock96 Spock96 is offline
Major Geek 'Spocky'
 
Join Date: Jan 2011
Location: Inside my computer.
Posts: 1,582
Thanks: 261
Thanked 113 Times in 106 Posts
Default HTML and Tables.

Hey Guys,
I'm working on my final project for my HTML class. What I have to do is make a personal web site.

I have it all down except this table:
Quote:
<Table Border="7">
<tr>
<th colspan="2">My Guitars.</th>
</tr>

<tr>
<td><b>My newest addition-- Ibanez V70</b></td>
<td><img src="Ibanez.jpg" alt="Ibanez"></td>
</tr>

<tr>
<td><b>My Electric-- First Act ME201</b></td>
<td><img src="ME201.jpg" alt="Electric"></td>
</tr>

<tr>
<td><b>first guitar-- First Act MG374 Acoustic Steel String Guitar (36-Inch, Blue with Star Graphics)</b></td>
<td><img src="First Act Acoustic.jpg" alt="First Guitar"></td>
</tr>
</table>
It works, just that my descriptions of my pictures, those cells are huge and my text isn't. How could I fix that?
Thanks,
Spock96
__________________
"Life can knock you down keep you there, then kick you in the teeth. But remember this my friends you can ALWAYS stand again."
Reply With Quote
Sponsored links
  #2  
Old 06-11-12, 11:52
GermanOne's Avatar
GermanOne GermanOne is offline
Corporal
 
Join Date: Feb 2009
Location: Thuringia / Germany
Posts: 297
Thanks: 4
Thanked 58 Times in 57 Posts
Default Re: HTML and Tables.

Just use a style sheet.
Code:
<style type="text/css">
  table tr td:first-child { width:20%; }
</style>
Regards
GermanOne
Reply With Quote
  #3  
Old 06-11-12, 12:35
mjnc mjnc is offline
Major Geek
 
Join Date: May 2007
Location: East coast, USA
Posts: 1,538
Thanks: 189
Thanked 394 Times in 341 Posts
Default Re: HTML and Tables.

You can also add a line break in that long description.

Code:
 <tr>
 <td><b>first guitar-- First Act MG374 Acoustic Steel String Guitar <br>(36-Inch, Blue with Star Graphics)</b></td>
 <td><img src="First Act Acoustic.jpg" alt="First Guitar"></td>
 </tr>
__________________
Experience is what you get right after you needed it.
Reply With Quote
  #4  
Old 06-11-12, 16:54
Spock96's Avatar
Spock96 Spock96 is offline
Major Geek 'Spocky'
 
Join Date: Jan 2011
Location: Inside my computer.
Posts: 1,582
Thanks: 261
Thanked 113 Times in 106 Posts
Default Re: HTML and Tables.

Quote:
Originally Posted by GermanOne View Post
Just use a style sheet.
Code:
<style type="text/css">
  table tr td:first-child { width:20%; }
</style>
Regards
GermanOne
Where would I put this in my code?
__________________
"Life can knock you down keep you there, then kick you in the teeth. But remember this my friends you can ALWAYS stand again."
Reply With Quote
  #5  
Old 06-11-12, 18:24
GermanOne's Avatar
GermanOne GermanOne is offline
Corporal
 
Join Date: Feb 2009
Location: Thuringia / Germany
Posts: 297
Thanks: 4
Thanked 58 Times in 57 Posts
Default Re: HTML and Tables.

Usually in the head.

Small example with your table (slightly changed to show how css work):
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
  <
head>
    <
meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <
title>Test</title>
    <
style type="text/css">
     
/*<![CDATA[*/
      
table                   width:100%; font:16px "Times New Roman"Timesserifborder:7px outset black; }
      
table th                font-size:20pxtext-decoration:underline; }
      
table thtrtd        border:1px outset black; }
      
table tr td:first-child width:20%; font-weight:bold; }
     
/*]]>*/
    
</style>
  </
head>
  <
body>
    <
table>
      <
tr>
        <
th colspan="2">My Guitars.</th>
      </
tr>
      <
tr>
        <
td>My newest addition-- Ibanez V70</td>
        <
td><img src="Ibanez.jpg" alt="Ibanez" /></td>
      </
tr>
      <
tr>
        <
td>My Electric-- First Act ME201</td>
        <
td><img src="ME201.jpg" alt="Electric" /></td>
      </
tr>
      <
tr>
        <
td>first guitar-- First Act MG374 Acoustic Steel String Guitar (36-InchBlue with Star Graphics)</td>
        <
td><img src="First Act Acoustic.jpg" alt="First Guitar" /></td>
      </
tr>
    </
table
  </
body>
</
html
Regards
GermanOne
Reply With Quote
Sponsored links
  #6  
Old 06-13-12, 10:20
Spock96's Avatar
Spock96 Spock96 is offline
Major Geek 'Spocky'
 
Join Date: Jan 2011
Location: Inside my computer.
Posts: 1,582
Thanks: 261
Thanked 113 Times in 106 Posts
Default Re: HTML and Tables.

This is my problem,
Quote:
<tr>
<td>First guitar-- First Act MG374 Acoustic Steel String Guitar (36-Inch, Blue with Star Graphics)</td>
Is there a way that I can "break" that into two lines?
Like this:
Quote:
First guitar-- First Act MG374 Acoustic Steel String Guitar
(36-Inch, Blue with Star Graphics)
__________________
"Life can knock you down keep you there, then kick you in the teeth. But remember this my friends you can ALWAYS stand again."
Reply With Quote
  #7  
Old 06-13-12, 10:59
GermanOne's Avatar
GermanOne GermanOne is offline
Corporal
 
Join Date: Feb 2009
Location: Thuringia / Germany
Posts: 297
Thanks: 4
Thanked 58 Times in 57 Posts
Default Re: HTML and Tables.

Use the <br> tag as mjnc already mentioned.

Regards
GermanOne
Reply With Quote
  #8  
Old 06-13-12, 11:25
Spock96's Avatar
Spock96 Spock96 is offline
Major Geek 'Spocky'
 
Join Date: Jan 2011
Location: Inside my computer.
Posts: 1,582
Thanks: 261
Thanked 113 Times in 106 Posts
Default Re: HTML and Tables.

Quote:
Originally Posted by GermanOne View Post
Use the <br> tag as mjnc already mentioned.

Regards
GermanOne
Oh, ok. Thank you.
__________________
"Life can knock you down keep you there, then kick you in the teeth. But remember this my friends you can ALWAYS stand again."
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Routing Tables savoxis Networking 1 01-10-08 11:16
MS Word tables rbilleaud Software 0 07-11-06 13:38
tables in MS Word... technaut Software 7 05-10-06 23:27
Tables HTML PHP mastermosley Programming 0 01-30-06 22:07
Tables (HTML) DinoRoberts Programming 6 11-16-03 19:18


All times are GMT -5. The time now is 20:39.


MajorGeeks.Com Home Page
| Admin Tools | All In One | Anti-Spyware | Anti-Virus | Appearance | Backup | Benchmarking | BIOS | Browsers | Covert Ops |
Data Recovery | Diagnostics | Drive Cleaners | Drive Utilities | Drivers | Driver Tools Ergonomics | Firewalls | Games | Game Tweaks | Graphics | Input Devices | Internet Tools | Macintosh | Mail Utilities | Memory | Messaging | Monitoring | Microsoft | Multimedia | Networking | Office Tools | Process Management | Processor | Registry | Security | System Info | Toys | Video | Miscellaneous
|

-->
Powered by vBulletin® Version 3.8.4
Copyright © 2009 vBulletin Solutions, Inc. All rights reserved.
Ad Management by RedTyger