[thelist] Background images and margins

John Hicks johnlist at gulfbridge.net
Mon Apr 24 11:23:17 CDT 2006

Norman Bunn wrote:
> I have some CSS that came with a Joomla template that I am trying to 
> adjust to meet my needs. This statement
> .topbar {height:2.25em;position:relative;top:1px;margin:0 1px;}
> works fine, indenting as desired on the left and right.  However, this 
> statement
> #header 
> {position:relative;width:100%;background:url(../images/headerbg.png) top 
> left repeat-x;background-color:900;margin:0 1px;}
> only indents on the left and runs flush on the right in IE and FF.

I believe your problem lies with the width: 100%. Since width refere to 
the bodypart lying within the margin, borders, and padding, setting it 
to 100% means you don't want any padding, borders, or margin.


> I 
> have tried various combinations to try to get this to work, but with no 
> success.  How do I get the background image to stop short of the right 
> side by 1 pixel?
> I'd love to show you the URL, but it is currently not published.  Here's 
> the applicable portion of the HTML:
> <.div class="topbar"><.p>Computer Solutions for Healthcare Professionals<./p><./div>
> <.div id="header">
> <.h1 title="Satterfield Computer Services"><.a href="index.php" title="Satterfield Computer Services">Satterfield Computer Services<./a><./h1>
> <./div>
> Thanks,
> Norman

More information about the thelist mailing list