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
Wierd backgroun issue on html element
Old 11-27-2009, 10:17 AM Wierd backgroun issue on html element
pealo86's Avatar
Super Spam Talker

Posts: 850
Name: Matt Pealing
Location: England, north west
Trades: 0
Happening in all but IE. I have a 1px wide image repeating across the html element, and a large background image positioned '0 center' on the body element.

But when applying the html background it knocks the background on the body element down by about 10 pixels for some reason! I've been sure to reset margins and paddings but to no avail.

Does anyone know how I can fix it?

Edit: if I add a border to the body it fixes the padding issue!? But I don't want a border

Code:
* {
    margin:0;
    padding:0;
    outline:none;
    border:none;
}

html {
    background:url(image/html.gif) repeat-x;
}

body {
    background:url(image/body.jpg) no-repeat center 0;
    font-family:Arial, Helvetica, sans-serif;
    font-size:14px;
    color:#545454;
    margin-top:0;
}
__________________

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


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


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

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

Last edited by pealo86; 11-27-2009 at 10:19 AM..
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
 
Register now for full access!
Old 11-27-2009, 01:47 PM Re: Wierd backgroun issue on html element
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.howtocreate.co.uk/tutoria...rgincollapsing
__________________
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 online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-27-2009, 01:58 PM Re: Wierd backgroun issue on html element
pealo86's Avatar
Super Spam Talker

Posts: 850
Name: Matt Pealing
Location: England, north west
Trades: 0
Ahhhh of course! I run into this so rarely I normally forget about margin collapse. I tend to fix it with a bit of 1px top padding

Thanks.
__________________

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


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


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

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
Reply     « Reply to Wierd backgroun issue on html element
 

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