Hi,
I'm having trouble with some white space that's appearing in my table.
I can't seem to spot the problem, it'd be great if someone could help.
The HTML code (ignore the PHP, it shouldn't be an issue) I'm using to
create the table is...
<table align="center" cellpadding="5" width="650" border="1">
<tr>
<td width="100">
<img src="<? echo $imgPath; ?>" width="100" height="130"/>
</td>
<td valign="top">
Title: <? echo $title; ?>
<br />Year: <? echo $year; ?>
<br />Certificatio n: <? echo $cert; ?>
</td>
</tr>
<tr>
<td colspan="2"><br /><br />Sypnosis: <p /><? echo $syp; ?></td>
</tr>
<tr>
<td colspan="2">
<br /><br /><a href="addtobask et.php?movID=<? echo $movID;
?>&movTitle=<? echo urlencode($titl e); ?>">Add to basket</a>
<br /><br /><a href="javascrip t: history.go(-1)">Back</a>
</td>
</tr>
</table>
I've taken a screenshot of the output from this code - http://img.photobucket.com/albums/v2...tmlproblem.jpg
I'm unsure as to what is causing the whitespace in the top left cell. I
need the text in the top right cell to be sitting up against the image.
I do have a table entry in my CSS file but the only attributes it
specifies are font-size, font-family and color.
Thanks. 8 3479 ch**********@go oglemail.com wrote: I'm having trouble with some white space that's appearing in my table.
Then don't use a table.
I can't seem to spot the problem,
How do you expect us to do any better - you didn't even post the URL.
I posted a screenshot and the code. I can give you the URL but it wont
work because the server doesn't allow public access.
Once upon a time *c***********@g ooglemail.com* wrote: I posted a screenshot and the code. I can give you the URL but it wont work because the server doesn't allow public access.
Who are you talking to?
How to quote: http://www.netmeister.org/news/learn2quote.html#toc2
From Google: http://www.safalra.com/special/googlegroupsreply/
--
/Arne
- "I travel cross the country and talked to the most competent persons,
and I can assure you that the computer is a fashion craze that will not
stand the whole year". (Editor for business literature, Prentice Hall, 1957)
IE is ignoring your 100px table cell width once you added the second TR
with a sufficient amount of text into the col-spanning TD. Try it
again with a synopsis of a few characters and you'll see what I mean.
Since you're using a table-based layout here, you might consider using
a table-within-a-table approach to avoid the browser guessing at the
best split point, e.g.
<table>
<tr>
<td>
<table>
<tr>
<td width=100>img</td>
<td>title year cert</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>synopsis</td>
</tr>
<tr>
<td>links</td>
</tr>
</table>
Style as necessary. Yucky,
Yucky Korpulent
To further the education of mankind, ci****@yahoo.co m declaimed: Since you're using a table-based layout here, you might consider using a table-within-a-table approach to avoid the browser guessing at the best split point, e.g.
Or how about just floating the image left?
--
Neredbojias
Apprentice Learner ch**********@go oglemail.com wrote : Hi,
I'm having trouble with some white space that's appearing in my table. I can't seem to spot the problem, it'd be great if someone could help. The HTML code (ignore the PHP, it shouldn't be an issue) I'm using to create the table is...
<table align="center" cellpadding="5" width="650" border="1"> <tr> <td width="100"> <img src="<? echo $imgPath; ?>" width="100" height="130"/>
Table cell = left cell padding + image width + rigth cell padding
100px = 5px + 100px + 5px
That is the equation your code is putting to/asking rendering browsers.
Your problem is that your code over-constrains the table and table
cells: this is a very very common problem with people using or abusing
table.
Here, I'd say that your table data is not tabular data. You use table
for laying out the info when the info is not tabular.
</td> <td valign="top"> Title: <? echo $title; ?> <br />Year: <? echo $year; ?> <br />Certificatio n: <? echo $cert; ?> </td> </tr> <tr> <td colspan="2"><br /><br />Sypnosis: <p /><? echo $syp; ?></td> </tr> <tr> <td colspan="2"> <br /><br /><a href="addtobask et.php?movID=<? echo $movID; ?>&movTitle=<? echo urlencode($titl e); ?>">Add to basket</a> <br /><br /><a href="javascrip t: history.go(-1)">Back</a>
Do not use "javascript :" pseudo-protocol in a link. The fault with your
code is more grave because you are trying to duplicate the normal
functionality of browser's back button with javascript.
This form of code
<a href="javascrip t: ...">some text</a>
should only and only be used for bookmarklet.
</td> </tr> </table>
I've taken a screenshot of the output from this code - http://img.photobucket.com/albums/v2...tmlproblem.jpg
I'm unsure as to what is causing the whitespace in the top left cell.
The default vertical positioning of data in a table cell <td> in all
browsers is middle. Also, your code requested a padding of 5px all
around the table cell.
Use CSS. Not table for positioning non-tabular data.
Table-based webpage design versus CSS-based webpage design: resources,
explanations and tutorials http://www.gtalbot.org/NvuSection/Nv...CSSDesign.html
Gérard
--
remove blah to email me This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Applebrown |
last post by:
Hello, basically, I'm just learning intermediate CSS and trying to convert
my old table webpage completely to CSS. Hoorah, right? Well, it's not quite
going as planned. It's an extremely simple layout, and I'm finding myself
stuck with small white space in between my images where I planned for the
graphics to be stacked up right on top of one another.
Here's the simple vertical layout: width is 640px, centered with a CSS
border. I'd...
|
by: Mark Moore |
last post by:
I'm trying to layout a couple text input fields and their
corresponding labels without using a table. When I was trying to
debug my understanding of CSS, I was *very* surprised to see that
span's with borders behave counter-intuitively (IMHO) when using
style="white-space: nowrap;".
Below is a fairly small chunk of XHTML that demonstrates what I'm
talking about. What gives?
-Mark
|
by: neverstill |
last post by:
hi-
I have a table on a page there is 1 row and 2 cells
cell 1 has a user control that is basically just a DataList nested in a
table o fit's own.
then, below that user control I have some <p> tags to give me vertical
space, then after that I have an <asp:image> control.
Now, I just added the asp:image control. when I did, it put about 10-12
|
by: Amar |
last post by:
I have a web form with several fields. Depending on user
selection in one combo box, i populate a text box and a
check box in one line. For example if the user selects 2
years, then i show the user two lines with each line
containing 1 text box and 1 check box. I have already put
in 10 lines, using ,<tr> in a table, from which i display
only the required number of <tr> in the code behind
(setting the visible property of controls). Each...
|
by: Bart Schelkens |
last post by:
i've created a webpage.
On this webpage i have a table.
Now for some reason there is a white space of about 0,5cm at the right side
of my table.
I told my table width="100%"
Can anyone explain me why i get that white-space ?
Thx
| |
by: shagy |
last post by:
Hi,
I'm having a problem with a <select><option> which has white space in
values...
When I post the data I only get the first word (up to the white space).
"Testing white space" becomes "Testing" after posting
code...
<select name="descr" id="descr">
|
by: JA |
last post by:
Is there a way to remove all the white space in the fields?
I have been using Find-and-replace - looking for 2 or 3 or 4 or 10 spaces
and replacing them with none. I don't want to replace single spaces, those
are the spaces between the words. But most of what is in the fields has been
cut-n-pasted from online forms, and the results can be VERY spread out. I
could probably save 80% of the space if I could get rid of the extra white
space....
|
by: amandadev |
last post by:
Hi there,
Please take a look at:
bluecelery.amandadevries.com/index.html
as well as the CSS and tell me why there is a white space in the table
in Firefox (that looks like a white horizontal line running through the
entire layout) which isn't present in IE (which, by the way, is the way
I want it to be).
|
by: Don Miller |
last post by:
When an ASP.NET 2.0 web page is rendered with multiple web controls hidden
from view (.visible=false) there is a noticeable gap between a rendered
element (like a table) and the next visible element (e.g. a button). When I
look at the HTML source code there is nothing there except white space (see
below).
First of all, I thought browsers ignore white space and condense it down to
one space, but most of all, how can controls be hidden...
|
by: progvar |
last post by:
Hi
i have not any idea how to remove white space in vb
actualy i am accessing value from table some time the column is null and some time it contain space means user press space bar to remove data from that field
when i access value null field executes but the field which contain white space
please give some idea how i can remove executes data in both conditions
or how i will remove white space
thanks
veer
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |