Page 1 of 1

A CSS problem?

Posted: Sat Jan 02, 2010 9:55 pm
by docman
Hi, I created a UserDefinedTag for an image rotator script. I does work fine, EXCEPT the following minor issue.

I use a default theme CSSMenu top + 2 columns with an associated stylesheet for the News Module. I want to use this stylesheet for my image rotator as:

div#rotator {
/* margin for the entire div surrounding the news items */
/*margin: 2em 0 1em 1em;*/
/* border set here */
border: 1px solid #909799;
/* sets it off from surroundings */
background: #f5f5f5;
}
div#rotator h2 {
line-height: 2em;
/* you can set your own image here */
background: url(uploads/ngrey/darknav.png) repeat-x left center;
color: #f5f5f5;
border: none;
}

My problem is that the image is shown with some offset between the H2 header and its background that I would like to close (so that image would be flush with the header). See the attached screen shot!

Thanks for your help.

Re: A CSS problem?

Posted: Sun Jan 03, 2010 1:53 pm
by Peciura
There is not enough info. To solve CSS issues you should provide link to site.

Re: A CSS problem?

Posted: Sun Jan 03, 2010 2:47 pm
by docman
Currently this is done on a local installation. Sorry. I try a workaround.

Thanks.

Re: A CSS problem?

Posted: Mon Jan 04, 2010 5:22 pm
by Dr.CSS
Most likely you need to add a margin call to your h2 as the default h2 has a margin under it and you are not telling it not to...

[Solved] Re: A CSS problem?

Posted: Mon Jan 04, 2010 9:00 pm
by docman
Thanks for the hint. I was able to close the gap under the heading.

Re: A CSS problem?

Posted: Mon Jan 04, 2010 9:27 pm
by Dr.CSS

Re: A CSS problem?

Posted: Mon Jan 04, 2010 9:51 pm
by docman
Sorry, your are absolutely right.