473,378 Members | 1,309 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.

newbie problems alignment in tables

Hi folks, I'm new to CSS and kind of lazy when it comes to coding, but I've tried to do this page by the book and it has a weird problem.

I've created a table with a particular background (specified by CSS) for certain cells. It looks great but when I put an IMG html in that cell, the background for that cell escapes the borders and is all out of alignment. The contents of the cell always seem to move to the top and the middle of the page. I'm checking everything works in IE6 and Firefox but this problem only occurs in IE6...

you can view the page at http://komosa.brinkster.net/shop2.html

the stylesheet is http://komosa.brinkster.net/content2.css

If anyone can figure out what causes this I'd very grateful! Maybe I need to set some alignment attributes for IMG....

Ian
Mar 4 '07 #1
7 1949
drhowarddrfine
7,435 Expert 4TB
First, you will never get IE6 to pretend it's a modern browser without a proper doctype. See the sticky at the top of this board. Use html4 strict.

Then validate your html and css for any errors reported there.

As a final note, you need to get in the habit of using lower case in your markup. HTML doesn't care but CSS and, later, xhtml does.
Mar 4 '07 #2
ok thanks for those pointers, I'll look into those issues
Mar 5 '07 #3
I looked into the doctype thing and it made things look slightly different but didn't solve the weird alignment problem. Does anyone have any other pointers?
Mar 5 '07 #4
drhowarddrfine
7,435 Expert 4TB
Of course, things changed. You didn't specify which set of rules you were using. By using a doctype, the rules were changed from 'quirks' (ala 1998) to modern standards. But you must establish the rules so all browsers are on the same 'page' before you can fix things.

The validator can't properly interpret part of your page so browsers will have trouble, too. Perhaps you are saving your text in utf8 or something else? Look into that but add this to the head of your code:
<meta http-equiv="content-type" content="text/html;charset=utf-8">

This establishes the character set. Then revalidate for your list of errors.

Again, all this may not solve the initial problem but we need to get on the right foundation.
Mar 5 '07 #5
ok thanks, I fixed the doctype and charset. I checked for errors and fixed all those I could. It gave me a few that I just don't understand like the HEAD tag being left unfinished

any more ideas are greatly appreciated
Mar 5 '07 #6
drhowarddrfine
7,435 Expert 4TB
You need to thoroughly read the error information. For the <head> error, it says it is incomplete. In this case, it's looking for the <title> tags inside the head. Look around and also close up the open ending tags.
Mar 5 '07 #7
ok all errors fixed! - in the html at least
Mar 5 '07 #8

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

Similar topics

5
by: Clint Olsen | last post by:
I did a Google about this, and I've seen this covered quite a few times - some leading to useful tricks with offsetof() to discern alignment and others using a big-union of intrinsic types to...
5
by: Hendrik Schober | last post by:
Hi, we just run into the problem, that "default" alignment in the project properies dialog seem to be different. We have a project that's a DLL, which is linked with a couple of LIBs. All are...
7
by: Earl | last post by:
Any known fixes for the wacky right-alignment bug in the WinForms datagrid (VS2003)? I've tried Ken's workaround...
8
by: Cardman | last post by:
I am hopeful that someone can quickly solve my image alignment issue when things are just not going right and where my attempts to solve this alignment issue have all failed. First of all take a...
1
by: supergrover1981 | last post by:
Gidday gang, I've been teaching myself CSS over the past 2 days and for the most part I thought I had it all working. All the problems I've had have been in IE...until now. If anyone could offer...
23
by: Gunnerman6875 | last post by:
Hi everyone, Well I'm a newbie to Access and your site so forgive me if my terminology is a little out. I'm currently trying to create what i thought would be a simple database for work. I'm in...
15
by: Matthew | last post by:
Hi, I'm mainly a coder, PHP at the moment, but from time to time need to design and use some css. I've a css text alignment issue. Mostly to align text neatly in the past I've used tables....
6
by: Wesley Peace | last post by:
I hate to cross post, but I've gotten no answer yet on a problem I'm having with visual studio 2008. I've created a series of forms with controls to access a Access database tables. The...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.