Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 28th, 2007, 02:40 AM
Authorized User
 
Join Date: Feb 2007
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Spacing between DIV blocks

There are some vertical DIV blocks in my Transitional HTML page. To give some vertical space in between, can I use this code below?
<div style="height:10px"></div>
I used it and its working, but there is a difference in heights with IE 6.0 and Firefox. The spacing in IE 6.0 is 13px where as Firefox takes correct space of 10px.

Shivanand Yerva
__________________
Shivanand
 
Old February 28th, 2007, 03:32 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Why don't you just give the already existing DIVs a margin? For example 'margin-bottom: 10px'. No need to add extra HTML elements.

--
http://yupapa.com
 
Old February 28th, 2007, 03:31 PM
Friend of Wrox
 
Join Date: Nov 2005
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Meow has wise advise use CSS to do what u need also try to avoid style attributes within your HTML
try this
Code:
<style>
div.costumDiv{
  margin-bottom:10px;
}
</style>
<div class="costumDiv">
  first div 
</div>
<div class="costumDiv">
  second div 
</div>
__________________________________________________ ________
I am DJ Kat...that's my name. Its a D and a J and a Kat with a K.





Similar Threads
Thread Thread Starter Forum Replies Last Post
div within a div and inherting the height brettdavis4 CSS Cascading Style Sheets 1 January 23rd, 2007 09:59 AM
spacing in between the words ramank Classic ASP Basics 1 November 20th, 2006 07:25 AM
PROBLEM SPACING jhanny007 Beginning PHP 2 November 16th, 2006 09:46 AM
superimpose <DIV> blocks anshul HTML Code Clinic 5 September 5th, 2004 02:16 PM
Spacing between datagrids skywalker1981 ASP.NET 1.x and 2.0 Application Design 3 April 19th, 2004 09:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.