Results 1 to 4 of 4

Thread: Problem with width for nested div padding

  1. #1
    Join Date
    Jan 2009
    Posts
    30

    Problem with width for nested div padding

    Hi,

    I am working on a nested div tag.
    I have div "b" in side of div "a" tag Like follows

    Code:
    <div id="a">
    some text
       <div id="a">
    some text
       </div></div>
    Now the problem is with insider div padding or say width.

    I want div "b" to span the width of "a" & div "b"s padding.

    Is there any way doing this?

  2. #2
    Join Date
    May 2008
    Posts
    24

    Re: Problem with width for nested div padding

    hey why don't you use table tag & solve the problem?
    Padding excluded from width is really not happening. I would like to ask, how to define perceptual width 100% and accurate padding 15px (I mean the inner space between borders and content), so that box will not overflow width of the screen? Thanks

  3. #3
    Join Date
    Jan 2009
    Posts
    67

    Re: Problem with width for nested div padding

    hey you can use negative margin on insider nested div.
    Like this:
    Code:
    <div id="a" style="padding: 5px;">
    some text
       <div id="b" style="margin:0 -5px; padding:0 5px;">
    some text
       </div></div>

  4. #4
    Join Date
    Jan 2009
    Posts
    30

    Re: Problem with width for nested div padding

    Ok thanks for the idea ill work around it & let you know if doesn't help me.

    Thanks guys

Similar Threads

  1. Problem with nested div when the content width exceeds window size
    By Laurense in forum Software Development
    Replies: 5
    Last Post: 04-03-2010, 07:58 PM
  2. Problem of nested query
    By MAGAR in forum Software Development
    Replies: 4
    Last Post: 09-12-2009, 09:55 PM
  3. Problem in Nested folder in .NET
    By rashmi_ay in forum Software Development
    Replies: 3
    Last Post: 30-11-2009, 10:36 PM
  4. Percentage problem on width of table columns
    By Zeverto in forum Software Development
    Replies: 3
    Last Post: 12-08-2009, 11:42 AM
  5. Problem with IE7 width margin
    By Dharmesh Arora in forum Technology & Internet
    Replies: 2
    Last Post: 19-03-2009, 03:24 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,551,813.27550 seconds with 17 queries