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
Div Layers, With An Image Alignment Issues!
Old 07-31-2006, 01:08 AM Div Layers, With An Image Alignment Issues!
KellyElizabeth's Avatar
Experienced Talker

Posts: 45
Location: The South
Trades: 0
OK, I am building a website for my brother and my example page is Premier Auto Source Inc.

Do you see that little darker grey strip between the two images (header and footer)? Here is my code from that /test2.php page:

<?include("header.php");?>


<div align="center">

<div id="outer">

<img src="/images/top.jpg" alt="TESTING" border="0" />




<img src="/images/bottom.jpg" alt="TESTING" border="0" />

</div>
</div>


and here is my corrosponding css file:

body {background-color: #0d0c0c;


}




div#outer {
position: absolute;
left: 50%;
width: 668px;
background-color:#0d0c0c;
margin-top:0px;
margin-bottom: 20px;
margin-left: -345px;
margin-right: 0;
padding:0px;
border:0;
}



Ok, now that you have that, First: why is it putting that little spacer grey stripe thing when I have all of mypadding set to 0? Second, how will I accomplish putting a div layer that will be seamless with my two images? I am experience with div layers, css and php, but I am pulling my hair out over here. PLEASE! HELP ME!!!!! I am on a time limit because this is for his personal business.
KellyElizabeth is offline
Reply With Quote
View Public Profile Visit KellyElizabeth's homepage!
 
 
Register now for full access!
Old 07-31-2006, 05:54 AM Re: Div Layers, With An Image Alignment Issues!
Average Talker

Posts: 22
Name: Dene Stringfellow
Trades: 0
Hi KellyElizabeth,

I presume you are probably using IE to browse the page. I've checked your test page using the following browsers:

OS Browsers
Mac OS9 Netscape 4.77, 6.2 & 7.0 / Opera 5.00 & 6.03 / Internet Explorer 5.1
Mac OSX Netscape 7.1 / Mozilla 1.7.13 / iCab 3.0beta382 / Safari 2.0.4 /
Firefox 1.5.0.5 / Camino 1.0.2 / Internet Explorer 5.2 / Opera 7.54u1
WinXP Pro Firefox 1.0.6 / Internet Explorer 6.0 / Opera 9.00

And the only browsers out of these that exhibit the problem are:

OS Browsers
Mac OS9 Netscape 4.77 & 6.2
WinXP Pro Internet Explorer 6.0

The older Mac OS9 browsers I can understand, but IE 6.0 under Windows as well! Maybe these browsers are being picky about the way the code is presented to them.

The fix is to place the images on the same line:

Code:
<?include("header.php");?>

<div align="center">

<div id="outer">

<img src="/images/top.jpg" alt="TESTING" border="0" /><img src="/images/bottom.jpg" alt="TESTING" border="0" />

</div>
</div>
and this then works in all the above browsers.

Hope this helps you hit your deadline.

Dene
ridgedale is offline
Reply With Quote
View Public Profile
 
Old 07-31-2006, 11:21 AM Re: Div Layers, With An Image Alignment Issues!
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Try the following three things. One, if not all, should work:

1) Put the following code in your CSS
Code:
img {
   border:  none;
   margin:  0;
   padding:  0;
}
This will make sure there are no borders and no spacing for any of your images by default (this can, however, be overridden by inline styles or classes, so it's not etched in stone.)


2) Try the following:
Code:
<div id="outer"><img src="/images/top.jpg" alt="TESTING" border="0" /><img src="/images/bottom.jpg" alt="TESTING" border="0" /></div>

You'll notice how there are no spaces between any of it. IE can be picky that way sometimes.

Finally,

3) Specify width and height attributes for your images. This probably won't solve your problem...it's just good practice.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)

Last edited by ADAM Web Design; 07-31-2006 at 11:24 AM.. Reason: Form submitted by accident.
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 07-31-2006, 11:35 AM Re: Div Layers, With An Image Alignment Issues!
Junior Talker

Posts: 1
Name: edith turner
Trades: 0
I like the site it looks good.
ebony1.eydie@gm is offline
Reply With Quote
View Public Profile
 
Old 07-31-2006, 07:38 PM Re: Div Layers, With An Image Alignment Issues!
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
One other suggestion, don't nail yourself down with absolutely positioning everything, you'll create more headaches for yourself. Use the normal document flow to your advantage. Make a main "container" and set it to position:relative. Then lay out the rest inside the container. Position absolute for an entire design is just not necessary and carries its own set of ugly bugs.
__________________
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 Layers, With An Image Alignment Issues!
 

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