Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > need to pre-fill a div with a fixed size spacer, what's the bestway?

Thread Tools

need to pre-fill a div with a fixed size spacer, what's the bestway?

Posts: n/a
In article <(E-Mail Removed)>,
Ben C <(E-Mail Removed)> wrote:

> On 2008-08-16, dorayme <(E-Mail Removed)> wrote:
> [...]
> > (Here is something, btw, that might surprise, look at how the
> > scroll-bars affect the look of the respective divs when the window is
> > narrowed to bring scroll-bars on, operate the bars to bring up the right
> > hand side and observe the difference between the floated div and the
> > unfloated one:
> >
> ><>
> > )

> This demonstrates that "shrink"-to-fit ends up being stretch-to-fit if
> the content's minimum width is wider than the available width.
> Occasionally people want the banner at the top of a page or something to
> be as wide as the content and not just only as wide as the viewport. You
> can do that by floating BODY left.


gets the border to behave intuitively right on scrolling (unlike the
lower div in the first URL above).

Reply With Quote

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
<div ... /> and <div ...></div> K Viltersten ASP .Net 4 03-31-2009 07:33 PM
<div question, getting fixed size of contents, not just character count HTML 3 08-26-2007 09:58 PM
fixed size div HTML 1 12-12-2005 04:37 AM
NS/FF don't change div offsetWidth when div innerHTML is added toand div becomes wider mscir Javascript 3 06-26-2005 04:04 PM
Q: Div A inside Div B is larger than Div B Dwayne Madsen Javascript 1 06-01-2005 03:02 PM