Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 11-14-2007, 11:12 PM Div/Image alignment
Junior Talker

Posts: 3
Trades: 0
Im failry new to CSS and ran into an alignment problem:

This is the page http://microeffects.com/new/index5.shtml and there is the corresponding CSS http://microeffects.com/new/template.css. The problem is the white border around the whole page, it's shifted to the left in IE and Firefox. I tried changing some values, but I somehow can't get it perfectly aligned. A trick or tip would be appreciated.

Thanks,
AnimeFox

Last edited by animefox; 11-14-2007 at 11:13 PM..
animefox is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-15-2007, 04:53 PM Re: Div/Image alignment
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
First of all, your DOCTYPE is in the wrong place. You've got it stuck in the <head> and it needs to be the FIRST THING on the page.

I'm also seen TWO <head></head> sections.
You've got a closing </div> without an opening <div>

You're also using and XHTML DOCTYPE but your using deprecated code like this:
<p align="center"> - that's what CSS is for and XHTML won't like it in the markup.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 11-15-2007, 11:13 PM Re: Div/Image alignment
Junior Talker

Posts: 3
Trades: 0
Quote:
Originally Posted by LadynRed View Post
First of all, your DOCTYPE is in the wrong place. You've got it stuck in the <head> and it needs to be the FIRST THING on the page.

I'm also seen TWO <head></head> sections.
You've got a closing </div> without an opening <div>

You're also using and XHTML DOCTYPE but your using deprecated code like this:
<p align="center"> - that's what CSS is for and XHTML won't like it in the markup.
1. corrected doctype
2. never had two head sections
3. dont have a closing w/o opening div
4. not using <p align="center">

and 5. still have the background problem.

thanks,
animefox
animefox is offline
Reply With Quote
View Public Profile
 
Old 11-16-2007, 05:24 AM Re: Div/Image alignment
Super Moderator

Posts: 1,576
Location: Kokkola, Finland
Trades: 1
4. not using <p align="center">

erm, yes you are! have a look at your own source

and you still have 24 errors
http://tinyurl.com/3cls3m
davemies is online now
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Old 11-16-2007, 05:38 AM Re: Div/Image alignment
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
given that your page extension is .shtml

included pages should NOT be complete pages with <html><head><body> sections
They should simply be the code that makes up that page segment.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-16-2007, 02:37 PM Re: Div/Image alignment
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Yes, that would explain the duplicate <head> sections I was seeing in the rendered pages.

As for the <p align="center" thing.. it shows up here:
Quote:
<body onload="dynAnimation()">

<p align="center">
<img border="0" src="http://www.microeffects.com/new/i/menu/ends_01.png" width="173" height="35"><a onmouseover="var img=document['fpAnimswapImgFP6'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsr c:img.getAttribute?img.getAttribute('lowsrc'):img. src;" onmouseout="document['fpAnimswapImgFP6'].src=document['fpAnimswapImgFP6'].imgRolln" href="javascript:void(0)"><img border="0" src="http://www.microeffects.com/new/i/menu/1_02.png" id="fpAnimswapImgFP6" name="fpAnimswapImgFP6" dynamicanimation="fpAnimswapImgFP6" lowsrc="http://www.microeffects.com/new/i/menu/2_02.png" width="69" height="35"></a><a onmouseover="var img=document['fpAnimswapImgFP7'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsr c:img.getAttribute?img.getAttribute('lowsrc'):img. src;" onmouseout="document['fpAnimswapImgFP7'].src=document['fpAnimswapImgFP7'].imgRolln" href="javascript:void(0)"><img border="0" src="http://www.microeffects.com/new/i/menu/1_03.png" id="fpAnimswapImgFP7" name="fpAnimswapImgFP7" dynamicanimation="fpAnimswapImgFP7" lowsrc="http://www.microeffects.com/new/i/menu/2_03.png" width="83" height="35"></a><a onmouseover="var img=document['fpAnimswapImgFP8'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsr c:img.getAttribute?img.getAttribute('lowsrc'):img. src;" onmouseout="document['fpAnimswapImgFP8'].src=document['fpAnimswapImgFP8'].imgRolln" href="javascript:void(0)"><img border="0" src="http://www.microeffects.com/new/i/menu/1_04.png" id="fpAnimswapImgFP8" name="fpAnimswapImgFP8" dynamicanimation="fpAnimswapImgFP8" lowsrc="http://www.microeffects.com/new/i/menu/2_04.png" width="88" height="35"></a><a onmouseover="var img=document['fpAnimswapImgFP9'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsr c:img.getAttribute?img.getAttribute('lowsrc'):img. src;" onmouseout="document['fpAnimswapImgFP9'].src=document['fpAnimswapImgFP9'].imgRolln" href="javascript:void(0)"><img border="0" src="http://www.microeffects.com/new/i/menu/1_05.png" id="fpAnimswapImgFP9" name="fpAnimswapImgFP9" dynamicanimation="fpAnimswapImgFP9" lowsrc="http://www.microeffects.com/new/i/menu/2_05.png" width="73" height="35"></a><a onmouseover="var img=document['fpAnimswapImgFP10'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsr c:img.getAttribute?img.getAttribute('lowsrc'):img. src;" onmouseout="document['fpAnimswapImgFP10'].src=document['fpAnimswapImgFP10'].imgRolln" href="javascript:void(0)"><img border="0" src="http://www.microeffects.com/new/i/menu/1_06.png" id="fpAnimswapImgFP10" name="fpAnimswapImgFP10" dynamicanimation="fpAnimswapImgFP10" lowsrc="http://www.microeffects.com/new/i/menu/2_06.png" width="77" height="35"></a><img border="0" src="http://www.microeffects.com/new/i/menu/ends_07.png" width="187" height="35"></p>

</body>
That is one UGLY mess for an image swap ! That's what you get when you use FrontPage.

If your PNG images are supposed to be transparent they won't work in IE6 w/o a bit of scripting to force it.

There's nothing wrong with your background, it's the placement of your #header and #header-menu that's off. You've told it to center those, and it did, which is exactly the problem. Fix your CSS to this and it will fix it.

Quote:
#header-menu {
/*margin: 0 auto;
text-align: center;*/
margin-left: 18px;
width: 695px;
height: 30px;
background: url('i/header-top.png');
background-repeat: no-repeat;
}

#header {
/*margin: 0 auto;
text-align: center;*/
margin-left: 18px;
width: 695px;
height: 200px;
background: url('i/header.png') no-repeat;
border: 1px solid red;
}
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Div/Image alignment
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.20722 seconds with 12 queries