Please select a category and click GO
UK Residents: Get great deals on high quality designer bathroom fittings from plumbfit.com

Plumbfit: Basin mixers, showers, taps, towel radiators Plumbfit: Bathroom showers, taps, towel radiators Plumbfit: Bathroom taps, showers, taps, towel radiators Plumbfit: Concealed showers, taps, towel radiators Plumbfit: Exposed showers, taps, towel radiators Plumbfit: Towel rails, showers, taps, towel radiators

Go Back Community for Webmasters & Developers > Client-Side Technology Forums > HTML, XHTML, and CSS Forum
Reload this Page what is pushing banner down?
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
HTML, XHTML, and CSS Forum The cup that holds the coffee: basic and advanced HTML and XHTML. Add style with CSS.

Time:
Scotland: Sat, 4:01 am
Rhode Island: Fri, 11:01 pm
Florida: Fri, 11:01 pm
New Mexico: Fri, 9:01 pm
California: Fri, 8:01 pm

Click here to visit Livelife365.com

Click here to visit nmdarts.com



Buy this Ad Space.

180px wide.

Please get in touch with KH@ if you are interested and make an offer.

Selanac Embroidery and Screen Printing

Embroidery
Screen Printing
Signs and Banners
Promotional Advertising

WEBSITE

Contact Paul Canales
TEl: USA 732-901-8417
CELL: USA 732-773-1339


Please click here for more information

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-20-2010, 12:24 AM
AngelaFrench AngelaFrench is offline
Citizen
 
Join Date: Aug 2001
Location: Olympia, WA
Posts: 1,626
AngelaFrench is a glorious beacon of light; ignite the blue touch paper and see for yourself AngelaFrench is a glorious beacon of light; ignite the blue touch paper and see for yourself AngelaFrench is a glorious beacon of light; ignite the blue touch paper and see for yourself
what is pushing banner down?

It's been forever since I've built a new css layout from scratch and right off the bat I'm stumped.

I've got a container div for my page, area (this is a mockup) and a banner div inside that. So far so good. Then I put a <p>tag in my banner div and in FF it pushed down the banner from the top of its container (creating what looks like a top margin on the banner div).

Why would that happen please?

<style type="text/css">

div#container {
width:800px;
height:500px;
border:1px solid #953A21;
margin-right:auto;
margin-left:auto;
padding-top:0;

}

div#banner {

width: 800px;
height: 100px;
background-color:#953A21;
padding:0;
margin:0;
color:#fff;

}


</style>
</head>
<body>

<div id="container">
<div id="banner">
<p style="margin:0;">test</p>
</div>

</form>
</body>
Reply With Quote
  #2  
Old 01-20-2010, 01:32 PM
coothead's Avatar
coothead coothead is offline
Citizen
 
Join Date: Feb 2003
Location: Chertsey, a small town 25 miles south west of London, England.
Posts: 614
coothead is a jewel in the rough, just bad at golf coothead is a jewel in the rough, just bad at golf
Hi there AngelaFrench,

try it like this...
Code:

<style type="text/css">
div#container {
    width:800px;
    height:500px;
    border:1px solid #953A21;
    margin:auto;
 }
div#banner {
    height:99px;
    border-top:1px solid #953a21;
    background-color:#953A21;
    color:#fff;
 }
</style>



<div id="container">
<div id="banner">
<p>test</p>
</div>
</div>
coothead
Reply With Quote
  #3  
Old 01-20-2010, 07:40 PM
AngelaFrench AngelaFrench is offline
Citizen
 
Join Date: Aug 2001
Location: Olympia, WA
Posts: 1,626
AngelaFrench is a glorious beacon of light; ignite the blue touch paper and see for yourself AngelaFrench is a glorious beacon of light; ignite the blue touch paper and see for yourself AngelaFrench is a glorious beacon of light; ignite the blue touch paper and see for yourself
The missing </div> tag you caught was just bad cut/paste on my part. The banner is still pushed down in FF. The only way I could get it not to was to add this to my style sheet:

*
{
margin:0;
padding:0;
}
Reply With Quote
  #4  
Old 01-22-2010, 10:41 AM
mmi's Avatar
mmi mmi is offline
tegwar champ
 
Join Date: Oct 2000
Location: is everything
Posts: 7,999
mmi has much to be proud of, unbeknownst to the taxman mmi has much to be proud of, unbeknownst to the taxman mmi has much to be proud of, unbeknownst to the taxman mmi has much to be proud of, unbeknownst to the taxman mmi has much to be proud of, unbeknownst to the taxman mmi has much to be proud of, unbeknownst to the taxman mmi has much to be proud of, unbeknownst to the taxman mmi has much to be proud of, unbeknownst to the taxman mmi has much to be proud of, unbeknownst to the taxman
Post a note in the magin

Here's an article that discusses this topic.
Quote:
Do not let the browser's defaults get in your way and be aware that elements can have different amounts of padding and margin as determined by the browser's own default stylesheet. It is your job to control this explicitly.
__________________

"In order to really enjoy a dog, one doesn’t merely try to train him to be semihuman. The point of it is to open oneself to the possibility of becoming partly a dog." — Edward Hoagland
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
JavaScriptshow each banner on page load javanewbie11 JavaScript Forum 0 12-29-2005 11:52 PM
JavaScriptBanner display based on time... NESMonster JavaScript Forum 21 12-29-2005 11:45 PM
JavaScriptRandom Banner Display - Random? paulp575 JavaScript Forum 3 02-23-2004 02:18 AM
JavaScriptBanner??? alexia_2003 JavaScript Forum 1 02-13-2004 02:30 AM
JavaScriptneed help with banner rotator script tinboye22 JavaScript Forum 2 07-23-2002 04:43 PM


All times are GMT +1. The time now is 04:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2010, WebXpertz.com. All Rights Reserved.