PDA

View Full Version : DivTags & Backgrounds


jnutella
01-20-2009, 05:59 PM
I created a wrapper div tag to hold all the other div tag and give it a black background,
Inside of the wrapper div i created a header, navbars, main, and footer div tags all with different background colors.
when i look at it in a browser all is OK, all div tags are but up against each other only displaying it background color.
As soon as i hit the enter button in any of the div tags or start typing or inserting text it creates a space between the div tags and now I see the background colors of the wrapper in between the divs tag ?

Does the same if a create a table and put divs in the table same problem?

Can anyone please help

Thanks

Corrosive
01-20-2009, 06:34 PM
I created a wrapper div tag to hold all the other div tag and give it a black background,
Inside of the wrapper div i created a header, navbars, main, and footer div tags all with different background colors.
when i look at it in a browser all is OK, all div tags are but up against each other only displaying it background color.
As soon as i hit the enter button in any of the div tags or start typing or inserting text it creates a space between the div tags and now I see the background colors of the wrapper in between the divs tag ?

Does the same if a create a table and put divs in the table same problem?

Can anyone please help

Thanks

Pressing 'enter' in design view is a hard return and will break your design. You need to put text in h and p tags really.

Ricky55
01-20-2009, 09:31 PM
in your div

<div id="someDiv">
<p>A paragraph of text</p>
</div>

domedia
01-21-2009, 01:57 AM
Pressing 'enter' in design view is a hard return and will break your design. You need to put text in h and p tags really.
I thought hitting the Enter key created a paragrpah, and CTRL+Enter was a hard return. I've not looked at Design View in a *very* long time so it might be bad memory.

edbr
01-21-2009, 02:54 AM
enter gives you <p>&nbsp;</p> shift - enter gives <br /> cnt-enter , like the pills your mummy gives you dont do anything at all, if i remember DW and Jefferson Airplane :)

Corrosive
01-21-2009, 07:59 AM
I thought hitting the Enter key created a paragrpah, and CTRL+Enter was a hard return. I've not looked at Design View in a *very* long time so it might be bad memory.

You might well be right. I haven't pressed anything in design view for ages! Either way it seems to break designs.