473,395 Members | 1,647 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,395 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 5105
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...
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?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.