div width

This is a discussion on "div width" within the Web Page Design section. This forum, and the thread "div width are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 20th, 2007, 19:18
Junior Member
Join Date: Aug 2006
Location: New Jersey
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation div width

hey is there some way sing javascript and/or css to make a div act like a table cell...ie. a table cell is only as wide as its content. but a div is as wide as it can be...unless other other wised stated. I want the div to "contract" to its content as much as possible. Id there are any example or code that you know off please point it to me ...thanks
Reply With Quote

  #2 (permalink)  
Old Aug 21st, 2007, 01:51
Reputable Member
Join Date: Jan 2004
Location: California
Age: 19
Posts: 232
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via AIM to tox0tes
Re: div width

you can try adding display:table, which is supposed to make it behave like a table element.
Reply With Quote
  #3 (permalink)  
Old Aug 21st, 2007, 02:05
Junior Member
Join Date: Aug 2006
Location: New Jersey
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Re: div width

we have a genius. thanks. i feel dumb. didnt know it was that simple. thanks
Reply With Quote
  #4 (permalink)  
Old Aug 21st, 2007, 03:25
Junior Member
Join Date: Aug 2006
Location: New Jersey
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Re: div width

hey we have a problem though. it does not work in ie. Is there any way around this?
Reply With Quote
  #5 (permalink)  
Old Aug 21st, 2007, 04:46
Reputable Member
Join Date: Jan 2004
Location: California
Age: 19
Posts: 232
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via AIM to tox0tes
Re: div width

ok i thought that might happen, try making a conditional stylesheet for ie and put display:inline-block and also overflow:hidden
Reply With Quote
Reply

Tags
div

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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
div width drappendix Web Page Design 2 Aug 22nd, 2007 14:34
Input width PicoDeath Web Page Design 3 Jul 31st, 2007 16:03
Div width problem NiKnight Web Page Design 1 Oct 13th, 2006 23:24
set CORRECT width for <img/> iersel Web Page Design 8 Jul 27th, 2006 07:33
Help with Width in Firefox.... JohnMitch Web Page Design 2 May 25th, 2005 09:26


All times are GMT. The time now is 16:19.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

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