Current location: Hot Scripts Forums » General Web Coding » CSS » CSS Layout problem


CSS Layout problem

Reply
  #1 (permalink)  
Old 06-09-05, 03:32 PM
Torbinsky Torbinsky is offline
Newbie Coder
 
Join Date: May 2005
Location: BC, Canada
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Talking CSS Layout problem

Hello and thank you for reading my post.

I am having a problem with the layout on a web site that I am working on. What I'm trying to do is have some absolutely position layers, such as a nav bar, banner, and a side nav bar, that don't move anywhere.

So, for example, the div tags for these 3 elements would have properties:
- position:absolute;
- left: ##px;
- top: ##px;
- width: ##px;
- height: ##px;

Then, I would like to have one main body element underneath all this which would have the background colour/image, but would also resize to fit in any layer(s) and their contents contained within it.

Example of this:
<div id="Body_Main">
<div id="content" style="position:relative;">Some content in here.</div>
</div>

I also want to be able to control the position of the content layer inside the Body_Main layer. Meaning I would like to tell the content layer to stay, for example, 50px from the left edge of the Body_Main layer.

What I was hoping for this to do is have the content layer and possibly one or two other layers inside this Body_Main layer and then if the content layer, for example, had a large amount of text in it, it would resize the Body_Main layer to fit the content layer inside still. This way the background would still follow the content. (I don't want to put a background in the content layer, that is why I want the Body_Main layer to resize to fit all the layers inside it.)

Is it even possible to do these things?

I hope I didn't over or under explain everything and that it's clear enough. Let me know if you can't understand what I'm asking and I will try to clarify.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 06-09-05, 07:16 PM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
Quote:
I also want to be able to control the position of the content layer inside the Body_Main layer. Meaning I would like to tell the content layer to stay, for example, 50px from the left edge of the Body_Main layer.
this could be done with margin-left: 50px;

as for changing the size of the layer depending on the content dynamically, someone else might help you on that tho I don't think it could be done but I could be wrong.
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 06-10-05, 11:50 AM
Torbinsky Torbinsky is offline
Newbie Coder
 
Join Date: May 2005
Location: BC, Canada
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Yeah, I've been reading through my css and dhtml books and I can't seem to find anything. It looks like I will have to resort to javascript. I've already written a script that resizes the main body layer to fit all its content layers, I was just hoping that I wouldn't have to use it It won't work either while IE keeps blocking my javascripts!!! Users will have to click that stupid bar on the top every time they visit the site to allow it to run, and I'm sure some of them won't trust it because they won't know that it's a harmless javascript that's running, not an activeX control or something.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with CSS footers and background james_51 CSS 0 02-05-05 12:47 AM
I Need Control Panel Layout Patiek Job Offers & Assistance 1 01-24-05 03:32 PM
Count problem kasic ASP.NET 1 10-20-04 01:23 AM
Asp and Microsoft Access 2002 problem gop373 ASP 2 10-06-04 10:13 AM
1024x768 res causes overlapping of text in layout Sash CSS 1 08-26-04 09:46 AM


All times are GMT -5. The time now is 10:05 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.