[WEB4LIB] Using CSS to control the height of an inline DIV element

Justin Rounds jrounds at lib.uchicago.edu
Fri Aug 27 10:31:48 EDT 2004


Try either of the following instead of using "display:inline":

	div.foo {
		position: absolute;
		right: 0px;
		width: 25%;
		height: 100%;
	}

or

	div.foo {
		float: right;
		width: 25%;
		height: 100%;
	}

I am currently unable to test these on a Mac, but the latest versions of 
Mozilla and IE on Windows work. One thing I'm pretty sure of is that on 
the Mac version of IE this *won't* work unless you run it in bugs-mode 
via doc-type switching (since for some odd reason the browser window is 
not considered a container).

-------------------------------------------
Justin Rounds
Graphic Design and Digital Media Specialist
Digital Library Development Center
University of Chicago
1100 E. 57th St.
Chicago, Illinois 60637
(773)702-4391
-------------------------------------------


John Fitzgibbon wrote:
> Hi,
> 
> I have created a DIV element which occupies the right 25 percent of the computer screen. To do this I have declared its display property to be inline rather than block. Because it is inline I can't control its height with the height property; the height of an inline element is determined by its content. I wish the element to be at least 100% of the screens height.
> 
> Any ideas would be much appreciated.
> 
> Regards
> John
> ************************************************
> This e-mail and any attachment contain information 
> which is private and confidential and is intended 
> for the addressee only.  If you are not an addressee, 
> you are not authorised to read, copy or use the e-mail 
> or any attachment.  If you have received this e-mail in error,
> please notify the sender by return e-mail and then destroy it.
> **************************************************************
> 
> #####################################################################################
> 
> This email has been scanned by MailMarshal, an email content filter. 
> Hosted by Galway County Council   
> #####################################################################################
> 



More information about the Web4lib mailing list