A CSS problem?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
docman
Forum Members
Forum Members
Posts: 103
Joined: Sat Oct 10, 2009 4:25 pm

A CSS problem?

Post 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.
Attachments
x.jpg
Peciura

Re: A CSS problem?

Post by Peciura »

There is not enough info. To solve CSS issues you should provide link to site.
docman
Forum Members
Forum Members
Posts: 103
Joined: Sat Oct 10, 2009 4:25 pm

Re: A CSS problem?

Post by docman »

Currently this is done on a local installation. Sorry. I try a workaround.

Thanks.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: A CSS problem?

Post 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...
docman
Forum Members
Forum Members
Posts: 103
Joined: Sat Oct 10, 2009 4:25 pm

[Solved] Re: A CSS problem?

Post by docman »

Thanks for the hint. I was able to close the gap under the heading.
Last edited by docman on Mon Jan 04, 2010 9:51 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: A CSS problem?

Post by Dr.CSS »

docman
Forum Members
Forum Members
Posts: 103
Joined: Sat Oct 10, 2009 4:25 pm

Re: A CSS problem?

Post by docman »

Sorry, your are absolutely right.
Post Reply

Return to “Layout and Design (CSS & HTML)”