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:17
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, 09:19
Up'n'Coming Member
Join Date: Aug 2007
Location: Bicester
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Re: div width

Hi drappendix

Why can't you use a span? (or put display:inline on your div?)

regards

justin
Reply With Quote
  #3 (permalink)  
Old Aug 22nd, 2007, 14:34
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,763
Blog Entries: 1
Thanks: 0
Thanked 18 Times in 18 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: div width

#foo {
display: table-cell;
}
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
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 4 Aug 21st, 2007 04:46
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 18:04.


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