Alternative to White Space and Images

Tweak

The Weedman
Joined
11 Apr 2004
Messages
39
I was wondering if anyone knew a way to avoid the troublesome problems involving tables, whitespace, and images. What I mean is if you make a cell with an image in it and you include any whitespace from the tag to the image itself, it adds that whitespace. That means that you can't use indents to format the code nicely. I was wondering if anyone knows a way around this problem or if I'm stuck without any tabs forever.
 
the easiest way is to make the table the same size as the background image or the image the same size as the table

eg:
Code:
<table width="100" 
height="333"  border="0" 
cellpadding="0" cellspacing="0" 
background="images/menu.gif">
 
Well the problem with that is sometimes IE doesn't listen to the attributes of the tables. I hate MS for that. They are lazy and they don't even listen to all the code you put in your file. Background images do work sometimes but honestly I think its pathetic that no one can create a browser that actually works right. I mean we are talking people who are paid thousands and they still **** it up.
 
You can use whitespace. HTML doesn't care about white space. The biggest problem is that most people do not create their tables correctly.

On a side note, I suggest you stop using tables for formatting. Learn CSS.
 
ignipotentis said:
On a side note, I suggest you stop using tables for formatting. Learn CSS.
Yep it is better to use CSS positioning instead of using tables for layout control, but dont forget about tables, there is no point using CSS for showing clearly tabular data if you use the tables properly.

Also just cause I had it drilled into me by my lecturers make sure you have valid code
http://validator.w3.org/
I still dont know why, but I often take a look at the HTML source of most sites just to see if they look like they are using valid code, and on a few occasions I have emailed the webmaster if the site is majorly broken in a browser other than MSIE
 
ignipotentis said:
You can use whitespace. HTML doesn't care about white space. The biggest problem is that most people do not create their tables correctly.

Well it does care about whitespace on IE. Thats the thing there is no way around it. You can search the web for people bitching and moaning about this and there isn't a solution as far as I can see. Whitespace affects tables even when done right trust me. I code everything by hand and stay away from nested tables with spacer images, etc. IE interprets white space wrong end of story.

CSS I do know but isn't a solution for what I'm doing sorry.
 
could you use CSS to control the image margins and padding? or maybe the cell margins and padding?
how are you doing your indents? 2 space or tab?
 
Ya but that doesn't matter. I mean HTML is only what the browser makes its. In a perfect world HTML would be listened to and whitespace wouldn't be payed attention to but obviously that isn't the case.
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back