I'm trying to use css to put two separate background images as a top header to a site - css as follows: (the left-hand part of the header (body-design) is combined with other background elements on the page e.g. in the nav, the right hand part of the head (headerpics) just auto fills out the blue header across the page.
__________________
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?
Here's the html - I can't see any white space I can take out?
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Real English School Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="header">
<p>header</p>
</div>
<div id="headerpics">
<p>headerpics</p>
</div>
<div id="navigation">
<p>nav bar</p>
<ul>
<li><a href="#"> an item</a></li>
<li><a href="#"> an item</a></li>
</ul>
</div> <!-- end of nav div -->
<div id="content">
<p>content</p>
<br/>
<p>more content</p>
<br />
<p>more content</p>
</div> <!-- end of content div -->
<div id="footer">
footer
</div> <!-- end of footer div -->
</body>
</html>
This may have something to do with padding and margins in the p tag. Try adding this to your css...
Quote:
p {
padding-left: 0;
margin-left: 0;
}
__________________
Cheers, John Irving: My Blog
JLI Media: Please login or register to view this content. Registration is FREE | Website Development (Link Coming Soon!)
The image for the body is 760 px wide and the headerpics should overlap from the 755px margin by 5px. I can't figure out if the white space is part of the headerpics div or not - I suppose it must be? the headerpics image is a strip 25px wide.
__________________
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?
Just butt up the end and start tags of adjacent elements when it strikes.
__________________
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?
Thanks, but I want to put as much of the design into the css as possible. I'm not too fussed about having a clickable logo as there will be a prominent link to the home page top left anyway.
I spent hours fiddling with this and no matter what I did that darned white strip was glaring out at me. In the end I went to bed on it and the next day I started the css page from scratch again, and it disappeared. Not sure what all that was about, but it's working now!
I'm trying to recreate the original design (http://www.realenglishschool.eu). It was the first website I ever made and lots of people have told me how nice it is to use, but if you take a look at the source code it's mighty horrible in there! I was using dreamweaver and xara with only a half working knowledge of html and now, 2 years later I am shocked by how disgusting it is back there! I want to have nice clean html pages with no clutter as I currently can't update anything without setting off a chain reaction of code failure as it's so badly done.
In that case, it would be simpler to start over with a new html/css framework, and then copy/paste your content into the new structure. I've tried 'fixing' old code - it's not worth the aggravation. It actually takes a lot less time to rebuild with a clean structure and code.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
In that case, it would be simpler to start over with a new html/css framework, and then copy/paste your content into the new structure. I've tried 'fixing' old code - it's not worth the aggravation. It actually takes a lot less time to rebuild with a clean structure and code.
Exactly what I'm doing! I didn't have a css file in the original anyway, as I'd never heard of it.....The old stuff is so nasty I won't touch it. I didn't write it - dreamweaver created it and I was happy as long as it worked. Thanks for the reply LadynRed - I've read a lot of your posts on here and respect is due to you!
This was causing me problems, too. I can't tell if this is by CSS design or a design flaw, as it happens in IE and Firefox. However, if you put an overflow:hidden in the style of your div with the background image, it will go away.