Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 23rd, 2008, 5:48 AM   #1
Yoony
Newbie
 
Yoony's Avatar
 
Join Date: Feb 2008
Location: pr2
Posts: 2
Rep Power: 0 Yoony is on a distinguished road
Talking Div Help

Hello ive just joined the forum so hello again,

ive been working on my free online games website,
as an alternative to iframes im using a <div> tag but because not all games are the same size most wont fit in a fixed sized box time. i need to make it so it will expand to the right size of the games.

e.g.
box not displayed (or very small) > Click link > box expands to fit .SWf file > everybodys happy!

Well i would be a great help if enyone could get back with a solution

Website:http://www.navgaming.tk

Thanks,
Tom

Last edited by Yoony; Feb 23rd, 2008 at 5:49 AM. Reason: Missed out site address
Yoony is offline   Reply With Quote
Old May 2nd, 2008, 12:58 AM   #2
Sorrofix
Expert Bug Developer
 
Sorrofix's Avatar
 
Join Date: Apr 2008
Posts: 21
Rep Power: 0 Sorrofix is on a distinguished road
Re: Div Help

If divs have no restrictions (i.e. no height/width or restrictions from parent containers), they normally will automatically expand to the size of the content they must contain. All that's left is for you to position it the way you want it.

How I'd probably position it is by using a parent container div to cover the general area where you want your game to be able to expand to. Then, for the actual div which contains the div, I'd mess with the margin-left css property. An alternative to margin-left would be to use position:absolute, and then use left/top/bottom values to position the div inside its container.

[edit] Whoops, my bad. That'll teach me to check the dates of threads before replying to them.
Sorrofix is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Div vs Table Layouts - Your opinion MiKuS HTML / XHTML / CSS 16 May 13th, 2008 8:46 PM
Div problems (javaScript) paulchwd JavaScript and Client-Side Browser Scripting 1 Nov 1st, 2007 8:36 PM
hiding / showing a div from code behind paulchwd ASP.NET 9 Sep 26th, 2007 6:46 AM
div paulchwd HTML / XHTML / CSS 2 Sep 24th, 2007 9:32 PM
Floating div make parent grow? gj15987 HTML / XHTML / CSS 2 Jun 21st, 2007 11:04 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:10 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC