473,378 Members | 1,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to move text up in a table

1
I currently have a table that looks like this: http://s8.postimg.org/gybzti0rn/Screen_Shot_2015_02_27_at_1_30_23_PM.png

I want to move the description of the boat up to the top of the image. I tried using valign="top", but this moved the description to the very top of the table, where the boat name is.

Here is my HTML:
Expand|Select|Wrap|Line Numbers
  1.  
  2. <table border ="1">
  3. <tr>
  4.     <th> Boat Name </th>
  5.   <th rowspan="2">Description</th>
  6.   </tr>
  7.   <tr>
  8.     <td><img src="boatimage.png"></td>
  9.   </tr>      
  10. </table>
  11.  
Thanks in advance for the help!
Feb 27 '15 #1
1 5098
Luuk
1,047 Expert 1GB
use CSS
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <style>
  5. div {
  6.         position: relative;
  7.         left: 10px;
  8.         top: 30px;
  9.         color: yellow;
  10. }
  11. </style>
  12. </head>
  13. <body>
  14.  <table border ="1">
  15. <tr>
  16.     <th> Boat Name </th>
  17.   <th rowspan="2">Description</th>
  18.   </tr>
  19.   <tr>
  20.     <td>
  21.         <div>Boat Name</div>
  22.         <img src="testimage.jpg" height="200px">
  23.         </td>
  24.   </tr>
  25. </table>
  26. </body>
  27. </html>
  28.  
  29.  
change 'left' and 'top' in the CSS to position the text correct.

I uses color yellow because my testimage has a dark color.... ;)
Feb 28 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Niall Linden | last post by:
Is there any way to move text over an AVI or shockwave object. i have put each one in its own <div> and can move them around and over each other. when i have text on text or on pictures its fine....
5
by: Lee Kindness | last post by:
I have many tables created in the "public" schema and I would like to migrate these into an "x001" schema. Unfortunately there is no ALTER TABLE construct for this... The following SQL would seem...
3
by: stajune | last post by:
Is it possible? Thanks! Carmelo
3
by: ronenk | last post by:
I have a good authentication form, which I use to login to my app. Now I want to be able to know which user is logged in now, in order to fill his answers in DB. In other words: I need to save &...
1
by: Ian Davies | last post by:
I am trying to move some text by clicking a button. When clicked the button runs the java script and this will then take the value in the text field and add 10 to it to create a new value, this is...
8
by: Gianni Rondinini | last post by:
hi all, i'm here again. i couldn't find/understand this on w3c css2 recommendation and documentation, then here i ask. i decided to still use some tables in my pages for some forms. i played...
0
by: Dhanasekaran B | last post by:
Hi, I need to move one table in one server(Live) to another server(Development) through Visual basic coding. Please send soultion for this
1
by: Man-wai Chang | last post by:
I have a *damaged* MyISAM stock_take_mst.frm in /var/lib/mysql/abc. And I would like to move it to /var/lib/mysql/test and experiment with it. Is there a MySQL command to detach and attach a...
1
by: maximom | last post by:
I have a page with a table on it and the table is too far below the banner across the top but I cannot figure out how to move it up closer to the menu bar. <div id="Nav"> <ul> <li><a...
3
by: Monster55Me | last post by:
Alrighty, so I have a text file with a lot of different things in, but what I want is for when a button is pressed, only 1 row of text is shown. For example the text file says Potato - Potato I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.