Web Design Forums

HTML and CSS Help

Having problems with these web design scripting? Ask here.

Absolute positioning and nested divs.



Site of the Month Voting - Now Open. CAST YOUR VOTE NOW!

Reply
 
LinkBack Thread Tools
Old July 2 '03, 12:54 PM (#1)
jkp23 is offline
New Member!
 
jkp23's Avatar
 
Join Date: July 2003
Location: Salvador, Brasil
Posts: 1
jkp23
Send a message via AIM to jkp23
Absolute positioning and nested divs.

I have a problem that seems to be reoccuring throughout the development of a site I am working on.

This is the first time I have gone for a pure CSS layout, and as such I am finding out how difficult it is to generate a one-size-fits-all css.

Anyway...the problem is this.

I have various divs, that are absolutely postioned, and within them I have other relative / absolute divs. The main div has a border around it, and holds all other divs, but it doesnt recognise that there is content below it on some occations, and just finishes in a location half way through the content.

So, for example.

I have a whole load of divs postioned relative to the main content div that produce the header, most of which are absolute (taking advantage of the fact that you can absolutely position relative to the parent object if it has a top and a left value defined). When I then go to put some text in after the header, it comes out at the top of the content div, on top of the header itself. IE: The content div isnt recognising the child divs as objects within as they have been defined as absolute i guess, and just carries on in the next place availible.

The only solution I have found is to insert a load of <br> statements that make the content below the header come out in the right place.

I have having the same problem with a nested float, later in the page.

I have a div which is bordered, and I want to float a menu on the left of the div, so I can put the other content to the right. The problem is the div finishes where the bottom of the other content, and not at the bottom of the nested/floated menu, which is bigger.

How do I deal with these kinds of problems to get things to go where they should?

I have played with many things, including the display property, which worked for some browsers by setting it to table, but not for others. Surely you should be able to nest absolute or floated elements and have the parent recognise that they are children?

take a look at:
A template i'm working on....
...for an idea of what im talking about.

Thanks for your time in advance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

  Web Design Forums » Programming Help » HTML and CSS Help

Bookmarks


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

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 On
Pingbacks are On
Refbacks are On


 
User Infomation
Your Avatar

Site Of The Month
Nominate Your Site Now!

Advertisement
WolfCMS.org

Latest Articles
- by RickM
- by bfsog

Advertisement

Partner Links



All times are GMT -4. The time now is 01:53 PM.


WebDesignForums.net is Copyright © 2010 RikeMedia.

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164