Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 28th, 2007, 02:40 AM
Authorized User
 
Join Date: Feb 2007
Location: Hyderabad, Andhra Pradesh, India.
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
Reply With Quote
  #2 (permalink)  
Old February 28th, 2007, 03:32 AM
Friend of Wrox
Points: 1,315, Level: 14
Points: 1,315, Level: 14 Points: 1,315, Level: 14 Points: 1,315, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , .
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
Reply With Quote
  #3 (permalink)  
Old February 28th, 2007, 03:31 PM
Friend of Wrox
 
Join Date: Nov 2005
Location: Rotterdam, , Netherlands.
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:50 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.