Wednesday, 15 May 2013

HTML/CSS Div Extending Beyond Its Closing Tag -



HTML/CSS Div Extending Beyond Its Closing Tag -

on web page i'm creating, page dynamically generated php-based cms. cms fetches info page database, echoes right html tags etc onto page.

the problem have reason browser extending div beyond it's closing tag.

ie: though can see tag closes, browser doesn't appear to, styling applied within div beingness applied whole page.

below html output. (this extract of page, , header div 1 that's persisting).

<div id="header"> <table> <tr> <td style="width: 10%;"> <img style="height: 120px; width: 101px;" src="img" alt="some alt"> </td> <td> <h2>heading</h2> <h3>subhead</h3> </td> </tr> <table> </div> <div id="menubar">

i've included opening of next div.

if seek , style h2 , h3 within of div, of h2 , h3 tags on page affected. here's css:

#header h2 { font-size: 24pt; font-weight: 900; color: #776f65; letter-spacing: 0; line-height: 0; } #header h3 { font-weight: 900; color: #776f65; letter-spacing: 0; padding-left: 35px; }

and finally, here's php code utilize generate html output:

echo('<div id="header">'); // header element begins here while($row = mysql_fetch_array($getheaderelements)) { echo($row['content']); } echo('</div>'); // end header element.

the browser i'm using google chrome.

does know why unusual behavior occurring?

regards, ben.

the "end" tag <table> start tag table.

this error cause of problem.

validate markup, it's inexpensive way pick sort of error.

css html styling

No comments:

Post a Comment