padding problem

falfouli
falfouli used Ask the Experts™
on
hi
my site is www.icqmontreal.com
on the left side bar just under the clock i am displaying a message: the car is....
how can i display this message from the top left corner of the box and not in the middle of the box i tried zeroing the padding but it doesn t work???
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Developer
Commented:
You have a DIV with a class name of "demos"
In there you have table with cellspacing of 30.  
I would suggest you remove the table completely (and enclosing tr and tds) and just have the DIV with class name of "message" left behind.

You have a lot of html error on your page.  Try using Firefox and installing an extension called HTML Validator to identify and remove errors on your HTML.  Once it is W3C standard, you will find that problem solving things like this is much easier because loosely related errors won't impact on the specific tags you are working on.

You are using XHTML document type.  Therefore:
* use <br /> rather than <br> in your scripts.  
* always put quotes around your attribute values (align="center" rather than align=center)
* ensure your ID attibute values are unique on the page (e.g. multiple tags with ID="PM")
* esscape URL links e.g. use "&amp;" instead of "&" in your src and href attributes.

Also, one usually puts colour styles on the td rather than tr tags of tables.


Hope this helps.
Have you tried setting the cellpadding of the surrounding table to 0 instead of 30? :-)
(actually, that table shouldn't even be there... what do you use it for in a div-based design?)
(just pointing out the obvious: our comments overlapped, of course BloodBaz' comment wasn't there when I posted mine...)

Author

Commented:
it helped a lot thank you!!
Chris WalshSoftware Developer

Commented:
@Holger: Always happening to me to!
@falfouli: Glad we could help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial