LiveZilla Live Help
 


Go Back   Chime Host - Web Hosting Forum > World Wide Web > Programming / Scripting / Coding Forum > HTML/CSS/DHTML
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

HTML/CSS/DHTML Place to talk about website design and get help with HTML, CSS, DHTML, etc.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-17-2009, 09:09 PM
Junior Member
 
Join Date: Oct 2009
J M 482 is on a distinguished road
Default HTML CSS divs - horizontally stretchable div question?

I'm just learning page layout using Divs, and am trying to fully learn absolute and relative positioning.

I was able to make a non-stretchable div aligned to the left side of the page (by default), and then, with absolute alignment, placing another div exactly to the right of it and giving it a width of 100% so it would stretch and occupy the remaining space to the right (if the user changes the size of the browser window). Fine, it works and was pretty simple.

But how do I do the exact same thing but flipped around? I want the left side of the page to have a div that stretches horizontally, and perfectly flush with that div I want a non-stretchable div to the right, touching the right side of the browser.

Example pic:

http://img62.imageshack.us/img62/4003/divstre.png

So, the blue and red should always be touching the far right of the browser, with no gaps. The yellow div will stretch horizontally if the browser is stretched bigger or smaller, but the blue and red divs should have fixed widths and always stay exactly the same size.

In the actual site, the red part is an image (80px high 40px wide)and the blue part is just a blank div with a background color and no text or image, but it should be 80px high and 20px wide (and not stretchable).

How can I do this? Can I do it without "floating".

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-17-2009, 09:09 PM
Junior Member
 
Join Date: Oct 2009
Lori O is on a distinguished road
Default

Well, I was all ready to say float right, but then you said without floating. I'm sure there are other ways, but I'm not sure off the top of my head.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

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


All times are GMT +1. The time now is 05:09 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ChimeHost, a Profuse Solutions LLC company