Reply
Table not aligning to top of page
Old 04-03-2008, 10:30 AM Table not aligning to top of page
ncriptide's Avatar
Skilled Talker

Posts: 64
Name: Reggie Byrum
Location: Charlotte, NC
I have inserted a table on my home page that I put in a div to control certain aspects of it.

However the table is not appearing right under the copy like it is suppose to . . . there is a LOT of space between the copy and where the table starts.

The site looks fine on a Mac using Safari and Firefox - but you see the space when viewing in Windows on Explorer.

Here's the link to the test page (under development):

http://www.chimneysupply.com/newSite/index.html

Any suggestions?
ncriptide is offline
Reply With Quote
View Public Profile Visit ncriptide's homepage!
 
When You Register, These Ads Go Away!
Old 04-03-2008, 12:43 PM Re: Table not aligning to top of page
wayfarer07's Avatar
$frontend->developer

Posts: 1,036
Name: Abel Mohler
Location: Asheville, North Carolina USA
There first thing I would do is not use depreciated attributes in XHTML 1.0 Strict mode. These attributes are "width" and "align". It is preferable to do this from the CSS document, but if you must do it this way, change your document type to "transitional". http://validator.w3.org/check?verbos...e%2Findex.html
__________________
Go FREELANCE <=|If a donkey eats a melon, it is still a donkey... |=> Hire Me

Last edited by wayfarer07 : 04-03-2008 at 12:44 PM.
wayfarer07 is offline
Reply With Quote
View Public Profile
 
Old 04-03-2008, 02:41 PM Re: Table not aligning to top of page
LadynRed's Avatar
Super Moderator

Posts: 6,554
Location: Tennessee
You need the Holly Hack on the div holding the table. Put a height: 1%; on it and the problem goes away.

You should NOT put that into your main css file, you should use conditional comments to call a SEPARATE css file that contains ONLY the properties needed to make IE6 behave.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 04-03-2008, 03:04 PM Re: Table not aligning to top of page
ncriptide's Avatar
Skilled Talker

Posts: 64
Name: Reggie Byrum
Location: Charlotte, NC
Quote:
Originally Posted by LadynRed View Post
You need the Holly Hack on the div holding the table. Put a height: 1%; on it and the problem goes away.

You should NOT put that into your main css file, you should use conditional comments to call a SEPARATE css file that contains ONLY the properties needed to make IE6 behave.
I'm fairly new at CSS . . . can you give me an example of what you're asking me to do? Thanks!
ncriptide is offline
Reply With Quote
View Public Profile Visit ncriptide's homepage!
 
Old 04-03-2008, 03:08 PM Re: Table not aligning to top of page
LadynRed's Avatar
Super Moderator

Posts: 6,554
Location: Tennessee
You need conditional comments in the <head> of your HTML file, like this:
Quote:
<!--[if lt IE 7]>
<link href="iefixes.css" rel="stylesheet" type="text/css" /> <![endif]-->
<!--[if gt IE 6]>
<link href="ie7fixes.css" rel="stylesheet" type="text/css" /> <![endif]-->
Then you need a new css file, my example is called iefixes.css.
In that file you would have ONLY the hacks needed to stop the IE6 bugs, in this case, the Holly Hack (google it !)

#productTable{height: 1%;}
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 04-03-2008, 03:14 PM Re: Table not aligning to top of page
wayfarer07's Avatar
$frontend->developer

Posts: 1,036
Name: Abel Mohler
Location: Asheville, North Carolina USA
All she is saying to make a conditional comment targeting IE6 that links a stylesheet only to that browser. This code would go in the <head></head> of your document:
<!--[if lte IE 6]><link href="css/ie6.css" type="text/css" rel="stylesheet" /><![endif]-->

Then, in that document:
Code:
div#productTable {
    height: 1%;
}
That't it!

Personally, I avoid CCs and use the underscore hack to target IE6, but that is another story.
__________________
Go FREELANCE <=|If a donkey eats a melon, it is still a donkey... |=> Hire Me

Last edited by wayfarer07 : 04-03-2008 at 03:17 PM.
wayfarer07 is offline
Reply With Quote
View Public Profile
 
Old 04-03-2008, 03:15 PM Re: Table not aligning to top of page
ncriptide's Avatar
Skilled Talker

Posts: 64
Name: Reggie Byrum
Location: Charlotte, NC
Thank you, LadynRed!!!!!!!

I really appreciate the help. I'll save the "Holly Hack" in my "Microsoft Weirdo Stuff" folder for future reference. . . :-)
ncriptide is offline
Reply With Quote
View Public Profile Visit ncriptide's homepage!
 
Old 04-03-2008, 03:16 PM Re: Table not aligning to top of page
wayfarer07's Avatar
$frontend->developer

Posts: 1,036
Name: Abel Mohler
Location: Asheville, North Carolina USA
Oops, looks like you beat me to the punch, Lady Oh well, I'll leave my comment up anyway...
__________________
Go FREELANCE <=|If a donkey eats a melon, it is still a donkey... |=> Hire Me
wayfarer07 is offline
Reply With Quote
View Public Profile
 
Old 04-03-2008, 03:16 PM Re: Table not aligning to top of page
LadynRed's Avatar
Super Moderator

Posts: 6,554
Location: Tennessee
You're welcome. You should also go read what's on this site:
www.positioniseverything.net for other IE bug-squashing solutions.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 04-03-2008, 03:41 PM Re: Table not aligning to top of page
ncriptide's Avatar
Skilled Talker

Posts: 64
Name: Reggie Byrum
Location: Charlotte, NC
I tried both suggestions and no change . . .

I'm putting

<!--[if lt IE 7]>
<link href="css/iefixes.css" rel="stylesheet" type="text/css" /> <![endif]-->
<!--[if gt IE 6]>
<link href="css/ie7fixes.css" rel="stylesheet" type="text/css" /> <![endif]-->

in my head section of my index page exactly as above.

Then I created a new css file called, "iefixes.css" and put it in my css folder.

Checked on iE6 - no change. I know I'm probably doing something stupid - what am I missing?
ncriptide is offline
Reply With Quote
View Public Profile Visit ncriptide's homepage!
 
Old 04-03-2008, 03:44 PM Re: Table not aligning to top of page
ncriptide's Avatar
Skilled Talker

Posts: 64
Name: Reggie Byrum
Location: Charlotte, NC
LadynRed,

I noticed in the code example you gave it made reference to "ie7fixes.css" , which I don't have. Is that suppose to be the name of my regular style sheet (home.css)?
ncriptide is offline
Reply With Quote
View Public Profile Visit ncriptide's homepage!
 
Old 04-03-2008, 05:24 PM Re: Table not aligning to top of page
serandfae's Avatar
Bank holdup redefined....

Posts: 4,714
Name: Tim Daily
Location: Apex, NC, US, Sol 3
Nope. That's so if you have any IE7 specific bugs you can put the fixes to them in the named file for it. The css files for the fixes are separate files, and the links to them go after your main style sheet link so those styles override the main one for those particular rules you specified.

The Holly Hack is for IE6 and below only, BTW; IE7 will either ignore or choke on it.

Also, make sure the path you specify in the link href to where your css file is located is valid.

tim
__________________
Springs hop eternal in the hearts of the eccentric....
E-GADS! (Evil Genius' Art and Design Studio) http://bellsouthpwp2.net/j/a/jam331
serandfae is offline
Reply With Quote
View Public Profile Visit serandfae's homepage!
 
Old 04-03-2008, 07:01 PM Re: Table not aligning to top of page
wayfarer07's Avatar
$frontend->developer

Posts: 1,036
Name: Abel Mohler
Location: Asheville, North Carolina USA
I'm not sure if this will work, but try this in the IE6 file, along with the Holly Hack:
Code:
div#productTable {
    height: 1%;
    overflow: visible;
}
__________________
Go FREELANCE <=|If a donkey eats a melon, it is still a donkey... |=> Hire Me
wayfarer07 is offline
Reply With Quote
View Public Profile
 
Old 04-07-2008, 08:05 AM Re: Table not aligning to top of page
bakerc's Avatar
Penguins on toast

Posts: 1,811
Name: carl
Location: UK
Quote:
Originally Posted by ncriptide View Post
LadynRed,

I noticed in the code example you gave it made reference to "ie7fixes.css" , which I don't have. Is that suppose to be the name of my regular style sheet (home.css)?
The link to 'ie7files.css' is an example only, use whatever names you like to name your stylesheets - just make sure the link points to the right stylesheet.

For EXAMPLE;

you have your main stylesheet 1st (stylesheet.css) then after that you put your conditional statements.

Hope this helps
__________________
adverse credit mortgage specialist, bad credit mortgage resources, credit repair and debt consolidation | debt management mortgage solutions.
bakerc is offline
Reply With Quote
View Public Profile Visit bakerc's homepage!
 
Reply     « Reply to Table not aligning to top of page
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.19612 seconds with 12 queries