[Web4lib] CSS Margins

Chris stearcs at auburn.edu
Wed May 30 13:54:00 EDT 2007


This is just off the top of my head but you may be able to override the 
inherited body {} style(s) by giving the toolbar div a width of 100% and 
giving it the !important declaration.

Bill Teschek wrote:
> Stacey,
> 
> Perfect answer. Worked like a charm. Thank you!
> 
> Bill Teschek
> bteschek at hampton.lib.nh.us
> 
> Knight-Davis, Stacey L. wrote:
> 
>> Have you tried a negative margin for the <div> containing the toolbar?
>> This would have some constraints, but I think this would allow the
>> margins to extend beyond those set for the body.  You would have to be
>> careful to make sure you did not put the toolbar off the screen at low
>> resolutions, but I think it might work to shove the toolbar past the
>> body's margin.
>>
>> Stacey Knight-Davis
>> Booth Library
>>
>> Eastern Illinois University
>> 600 Lincoln Ave.
>> Charleston, IL  61920
>>
>> 217-581-7549
>> slknight at eiu.edu 
>>
>> -----Original Message-----
>> From: web4lib-bounces at webjunction.org
>> [mailto:web4lib-bounces at webjunction.org] On Behalf Of Bill Teschek
>> Sent: Wednesday, May 30, 2007 11:50 AM
>> To: web4lib at webjunction.org
>> Subject: Re: [Web4lib] CSS Margins
>>
>> I understand how it is possible to have two different div classes -- one
>> for 
>> the toolbar and one for the rest of the page. My problem is that as it
>> is now 
>> currently set up for thousands of our web pages, the margins are set for
>> all 
>> data within the <body> tags. Since the toolbars have to be within those
>> tags, 
>> is there a way to write the style code so that it ignores the margins
>> settings 
>> for that particular section of the page? If not I'll just have to do
>> some 
>> complicated searching and replacing and stop using the body tags to
>> define the 
>> margins.
>>
>> Thanks again,
>>
>> Bill Teschek
>> bteschek at hampton.lib.nh.us
>>
>>
>>
>>> Well, everything has to stay inside the body tags. Just set margins
>> and 
>>> padding on body in your stylesheet to 0, put your toolbar div at the
>> top 
>>> of the page, and place a wrapper div that indents all of the page's 
>>> content beneath the toolbar div.
>>
>> _______________________________________________
>> Web4lib mailing list
>> Web4lib at webjunction.org
>> http://lists.webjunction.org/web4lib/
>>
> 
> 
> 
> _______________________________________________
> Web4lib mailing list
> Web4lib at webjunction.org
> http://lists.webjunction.org/web4lib/
> 

-- 
Chris Stearns
Software/Programming
Auburn University Libraries
334.844.1747


More information about the Web4lib mailing list