homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

DIV not working correctly
text not showing in div

Msg#: 4580185 posted 7:14 pm on Jun 1, 2013 (gmt 0)


I'm having trouble working on a project for a client. I'm new to using css positioning and DIVs and I've made some kind of mistake that I can't identify. The project is a medical form that I'm recreating from a PDF file.

I am using DIV containers to position the different form boxes and headers and I cannot get the text in the lower header to show.
Can someone please help ASAP? I'm on a deadline for this project.

Here is the code:

<DIV class="leftHeader">



and the css for this DIV

.leftHeader {
height: 30px;
margin:0px auto;

The text "hormone assay" is not showing, only the grey background no matter what I do! There are two other DIVs above this one and the grey background has to be the same width as the DIV above it which it is...that's not a problem...its that the text wont show. It is showing in Microsoft Expression Web but not on the page itself in either browser.




WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

Msg#: 4580185 posted 8:15 pm on Jun 1, 2013 (gmt 0)

White text on gray background? I hope this isn't for an ophthalmologist's site :)

Is this the only div with this background? So you're sure you're seeing this one and not something else? If in doubt, set a visible border on only this div. Just for testing; throw it out as soon as things are working.

height: 30px;

{position: fixed;} is probably the single trickiest positioning scheme there is. It may help to spell out, in English, what you want the element to look like and how you want it to behave.

In this example, three of the values are offsets determined by the containing box-- which for {position: fixed} is the viewport, not the page. If you add everything up, the element will only display as intended if the viewport is about 46px wide (i.e., number that 30px would be 65% of) by 795px tall. This sounds over-constrained to me ;)

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved