Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / June 2005



Tip: Looking for answers? Try searching our database.

Controlling size of div based on content

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ryan.champlin@firstlogic.com - 29 Jun 2005 18:35 GMT
I've created a div tag that has overflow set to scroll in  my css file.
Now I've embedded a table inside of that div.  However, a div always
expands to the size of it's container.  Here the whole width of the
browser.  Thus, the scroll bar shows up way at the right and the data
in the table stops short.  I'd like the DIV to only get as wide as the
table which I have nested inside of it.  Is there a way to get the DIV
tag to do this so the scroll bar looks correct.

Thanks,
Ryan
Johannes Koch - 29 Jun 2005 22:49 GMT
> I've created a div tag that has overflow set to scroll in  my css file.
>  Now I've embedded a table inside of that div.  However, a div always
[quoted text clipped - 3 lines]
> table which I have nested inside of it.  Is there a way to get the DIV
> tag to do this so the scroll bar looks correct.

Why don't you put the overflow property on the table selector?
Signature

Johannes Koch
In te domine speravi; non confundar in aeternum.
                            (Te Deum, 4th cent.)

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.