Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 22-06-2009
Member
 
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?
Reply With Quote
  #2  
Old 22-06-2009
Member
 
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
Reply With Quote
  #3  
Old 22-06-2009
Member
 
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>
Reply With Quote
  #4  
Old 22-06-2009
Member
 
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
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 10:37 PM.