Register FAQ/Rules Forum Spy Search Today's Posts Mark Forums Read

Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate.

 
Go Back   Mac Forums > Special Interests > Web Design and Development
TouchArcade.com - iPhone Game Reviews and News

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 21, 2005, 08:05 PM   #1
obelix
macrumors member
 
Join Date: Oct 2004
Needing help with CSS

http://www.obelix.ca/zeroone/beauty/index4.html

The link above shows what I'm trying to do. Basically I need 2 headers at the top of the page, a main content area that contains 3 boxes that need to be able to expand dynamically, and 2 footer elements.

I can't seem to get the boxes in the middle to fit inside the enclosing container. The enclosing container is "supportingText" and it won't even appear unless I hardset the height... I would like this section to expand dynamically as the boxes expand. Any ways this is possible?

Your help is much appreciated!
obelix is offline   Reply With Quote
Old Dec 21, 2005, 08:26 PM   #2
bobber205
macrumors 68020
 
bobber205's Avatar
 
Join Date: Nov 2005
Location: Oregon
Send a message via AIM to bobber205 Send a message via Yahoo to bobber205 Send a message via Skype™ to bobber205
Nice

Good for you! All of your coding seems to be done in hand.
I'm always happy to see that.

As for growing a box dynamically, I would access the <div>'s style.width and height properties with Javascript.

Make sure and don't forget to use document.getElementById.

But all and all, a well done page.
Good luck.
bobber205 is offline   Reply With Quote
Old Dec 21, 2005, 08:32 PM   #3
obelix
Thread Starter
macrumors member
 
Join Date: Oct 2004
I'd really rather stay away from JS is there any other way this can be done? It always seems like doing a straight CSS design is infinitely harder than doing it with tables... (sigh)
obelix is offline   Reply With Quote
Old Dec 21, 2005, 08:37 PM   #4
bobber205
macrumors 68020
 
bobber205's Avatar
 
Join Date: Nov 2005
Location: Oregon
Send a message via AIM to bobber205 Send a message via Yahoo to bobber205 Send a message via Skype™ to bobber205
I don't know why you don't want to use JS.
Super easy. And this will take about 1 minute to code.

And table designs are BAD!

And how did you dynamically change the table's values?
bobber205 is offline   Reply With Quote
Old Dec 21, 2005, 08:43 PM   #5
obelix
Thread Starter
macrumors member
 
Join Date: Oct 2004
I don't want to use JS because its not always enabled on all browsers and in the case that it is disabled I'd still like the site to be viewable. Also I'm not sure how JS could be used to correct this problem (any code samples?)

Right now the tables values do not dynamically change... that is the problem. The gray area with the background is a hard-set value at 200px and although it sort of work in IE in Firefox and Safari the result is terrible. The box that says "content left" should not be extending past the bottom of the gray background.
obelix is offline   Reply With Quote
Old Dec 21, 2005, 08:50 PM   #6
bobber205
macrumors 68020
 
bobber205's Avatar
 
Join Date: Nov 2005
Location: Oregon
Send a message via AIM to bobber205 Send a message via Yahoo to bobber205 Send a message via Skype™ to bobber205
Code:
var cssBox = document.getElementById("mybox");

cssBox.style.width = "100px";
That should get you started. And mybox should be whatever the "id" attribute in your <div> tags are.

Good luck.
bobber205 is offline   Reply With Quote

Reply

Mac Forums > Special Interests > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:14 PM.

Mac News | Mac Rumors | iPhone Game Reviews | iPhone Apps

Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright 2002-2009, MacRumors.com, LLC