Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Setting DIV Height

Reply
Thread Tools

Setting DIV Height

 
 
Jeff Bowman
Guest
Posts: n/a
 
      12-22-2006
Hi Kids

Say, what's the general consensus on using tables to force layer height,
like so:

http://jeffbowman.com/boxtest/

Thanks!



--
We're losing America. To see how you can help
get her back, visit www.FreedomToFascism.com.





 
Reply With Quote
 
 
 
 
-Lost
Guest
Posts: n/a
 
      12-22-2006
"Jeff Bowman" <> wrote in message
news:458b41a0$...
> Hi Kids
>
> Say, what's the general consensus on using tables to force layer height, like so:
>
> http://jeffbowman.com/boxtest/
>
> Thanks!


Well, people have been misusing tables for quite a few years so why stop now?

Seriously, if you are already playing about with CSS, why not just set the height via CSS?

Also, totally off the subject... what in the world is all that extraneous code for? I
also do not understand why for such a small example you appear to be dynamically
generating each of eight PNGs. Weird.

-Lost


 
Reply With Quote
 
 
 
 
Bergamot
Guest
Posts: n/a
 
      12-22-2006
Jeff Bowman wrote:
>
> Say, what's the general consensus on using tables to force layer height,
>
> http://jeffbowman.com/boxtest/


Regardless of the type of container, setting a fixed height rarely works
well with text elements, especially when the height is set in px units.
Take a look in Firefox with text zoomed up a couple notches and see what
happens.

--
Berg
 
Reply With Quote
 
Jeff Bowman
Guest
Posts: n/a
 
      12-23-2006
"-Lost" <> wrote in message
news. ..

> Well, people have been misusing tables for quite a few years so why stop
> now?


HeHeHe...



> Seriously, if you are already playing about with CSS, why not just set the
> height via CSS?


Oh my! Last I heard it wasn't possible--this must be new news?

If there's actually a way to do it, I'd sure be pleased if you could send a
quick tip...



> Also, totally off the subject... what in the world is all that extraneous
> code for? I also do not understand why for such a small example you
> appear to be dynamically generating each of eight PNGs. Weird.


Sure, no problem, I can help you with that

It's an ASP.NET server control that I'm building. It enables the web
application developer to specify various settings--CornerRadius, ForeColor,
BackColor, etc.--and then the control generates the appropriate CSS and
images dynamically at runtime. At design time all the developer has to do is
drag and drop the control onto a form, set a few properties and presto! it
works--no fiddling with images and such. It's basically a productivity tool.

True, there's extra bandwidth and CPU overhead associated, but given today's
machine capacities those are relatively minimal and shouldn't be a concern
for all but the most demanding of applications. And once an image is
generated for the first time it goes into the server-side memory cache, so
CPU usage is kept down even further.

All this is well and good, I suppose--I'm pretty handy at server-side logic
and database stuff, but it's you guys I stand in awe of. The way you're able
to make a browser sit up and pay attention continually amazes me. And the
designs--my goodness what designs!

Thanks!




 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      12-23-2006
In article <>,
"Jeff Bowman" <> wrote:

> but it's you guys I stand in awe of. The way you're able
> to make a browser sit up and pay attention continually amazes me. And the
> designs--my goodness what designs!


I am going to watch you very closely now and see if this flattery
does you any good. I tried all the Dale Carnegie courses and
failed. I went to see a shrink about it, he mumbled about needing
to be genuine and that is where I needed to improve. But if I
watch you very very closely, I reckon I could improve my cover...
<g>

--
dorayme
 
Reply With Quote
 
Jeff Bowman
Guest
Posts: n/a
 
      12-23-2006
"Bergamot" <> wrote in message
news:...
> Regardless of the type of container, setting a fixed height rarely works
> well with text elements, especially when the height is set in px units.


FWIW, the only time the control emits table markup is if the FillColorBegin
and FillColorEnd properties aren't the same--IOW a gradient is called for,
such as in this particular example. And that's only because I'm pretty sure
it's not possible to stretch a background image--but I could be wrong.

If there's no background image there's no need for a fixed height and
therefore no need for a table.

Maybe I should be asking instead if there's a way to stretch a background
image?



> Take a look in Firefox with text zoomed up a couple notches and see what
> happens.


Yep, spotted that one already. Same considerations as above apply.

I may end up having to just warn users of the control about the design
issues associated with setting a gradient fill, although I hope it doesn't
come to that last resort.


 
Reply With Quote
 
-Lost
Guest
Posts: n/a
 
      12-23-2006
"Jeff Bowman" <> wrote in message
news:...
> "-Lost" <> wrote in message
> news. ..
>
>> Well, people have been misusing tables for quite a few years so why stop now?

>
> HeHeHe...
>
>> Seriously, if you are already playing about with CSS, why not just set the height via
>> CSS?

>
> Oh my! Last I heard it wasn't possible--this must be new news?
>
> If there's actually a way to do it, I'd sure be pleased if you could send a quick tip...


Well, often I hear that giving the body a height of 100% allows for DIVs of varying
percentage heights.

What *I* have found to work however is simple using absolute position (with top, right,
left, or bottom) and then applying the height of the DIV. In that fashion I get 100% DIVs
with no problem.

Another thing that I think actually may be of more use to you is:

http://www.greywyvern.com/code/min-height-hack.html

>> Also, totally off the subject... what in the world is all that extraneous code for? I
>> also do not understand why for such a small example you appear to be dynamically
>> generating each of eight PNGs. Weird.

>
> Sure, no problem, I can help you with that
>
> It's an ASP.NET server control that I'm building. It enables the web application
> developer to specify various settings--CornerRadius, ForeColor, BackColor, etc.--and
> then the control generates the appropriate CSS and images dynamically at runtime. At
> design time all the developer has to do is drag and drop the control onto a form, set a
> few properties and presto! it works--no fiddling with images and such. It's basically a
> productivity tool.
>
> True, there's extra bandwidth and CPU overhead associated, but given today's machine
> capacities those are relatively minimal and shouldn't be a concern for all but the most
> demanding of applications. And once an image is generated for the first time it goes
> into the server-side memory cache, so CPU usage is kept down even further.
>
> All this is well and good, I suppose--I'm pretty handy at server-side logic and database
> stuff, but it's you guys I stand in awe of. The way you're able to make a browser sit up
> and pay attention continually amazes me. And the designs--my goodness what designs!
>
> Thanks!


Ah, OK. It was naive of me to think it was "just a simple test".

Also, I would reserve some of the awe for others more deserving of it. I may not be the
best candidate for praise. Thank you nonetheless.

Be well, Jeff.

-Lost


 
Reply With Quote
 
Bergamot
Guest
Posts: n/a
 
      12-23-2006
Jeff Bowman wrote:
>
> Maybe I should be asking instead if there's a way to stretch a background
> image?


No, there isn't - all you can do reliably is repeat on the x and/or y
axis. Maybe CSS3 has a stretch property (haven't checked), but don't
hold your breath waiting for that.

About the best you can do is anchor the image to either the top or
bottom corner and repeat-x. Set the background color so that it blends
with wherever the gradient color leaves off.

BTW, there was an article posted at A List Apart about another way of
making gradient backgrounds, but I didn't save the URL. Maybe it will be
useful to you, if you can find it.

--
Berg
 
Reply With Quote
 
-Lost
Guest
Posts: n/a
 
      12-24-2006
"Bergamot" <> wrote in message news:...
> Jeff Bowman wrote:
>>
>> Maybe I should be asking instead if there's a way to stretch a background
>> image?

>
> No, there isn't - all you can do reliably is repeat on the x and/or y
> axis. Maybe CSS3 has a stretch property (haven't checked), but don't
> hold your breath waiting for that.
>
> About the best you can do is anchor the image to either the top or
> bottom corner and repeat-x. Set the background color so that it blends
> with wherever the gradient color leaves off.
>
> BTW, there was an article posted at A List Apart about another way of
> making gradient backgrounds, but I didn't save the URL. Maybe it will be
> useful to you, if you can find it.
>
> --
> Berg


This might be it.d

http://www.alistapart.com/articles/supereasyblendys/

-Lost


 
Reply With Quote
 
Jeff Bowman
Guest
Posts: n/a
 
      12-27-2006
"dorayme" <> wrote in message
news:doraymeRidThis-...
> In article <>,
> "Jeff Bowman" <> wrote:
>
>> but it's you guys I stand in awe of. The way you're able
>> to make a browser sit up and pay attention continually amazes me. And the
>> designs--my goodness what designs!

>
> I am going to watch you very closely now and see if this flattery
> does you any good. I tried all the Dale Carnegie courses and
> failed. I went to see a shrink about it, he mumbled about needing
> to be genuine and that is where I needed to improve. But if I
> watch you very very closely, I reckon I could improve my cover...
> <g>


Well, hopefully it'll get me everywhere--if I'm lucky, maybe even
Carnegie/Hall


--
We're losing America. To see how you can help
get her back, visit www.FreedomToFascism.com.


 
Reply With Quote
 
 
 
Reply

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 Height = Image height. help muggslab HTML 1 02-01-2010 07:41 PM
child div blocks parent div, height problem... HJ HTML 5 09-01-2006 04:37 PM
Change height of DIV when div border set marco_giuliani_it@hotmail.com Javascript 0 09-21-2005 02:42 PM
How to tell height of div where height is not set? Don Vaillancourt Javascript 8 01-31-2005 11:32 AM
Setting <img> height to match <td> height MyndPhlyp Javascript 5 12-22-2003 05:30 AM



Advertisments
 



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