TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 16, 2024, 06:26:41 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,158
  • Total Topics: 21,219
  • Online today: 106
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 64
  • Total: 64

coding content boxes

Started by Sforzando, October 12, 2006, 11:33:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sforzando

Hi, everyone here was really helpful when I was having trouble getting my site to fit any screen resolution. I'm really gateful, particularly to IchBin.

But now I'm trying to redesign my site, and I've noticed that a lot of websites put their content now into little boxes. For example, at http://www.madonna.com there is a big background image of her and then all the content is in little white boxes over that. The boxes display automatically and can be exited by clicking an x at the corner.
How are these kinds of boxes made?
I thought at first it was like a java popup script, but it's not. And it's not really a table or something put in by a div tag, cuz it can be exited by clicking the box.
So what exactly are they?
Are they part of the CSS Box Model? (I honestly have no idea what that is).
Are they a flash feature?
I like the look, so if someone could explain in general how they are coded, I'd really appreciate it.
Thanks

IchBin


Sforzando

Thanks very much.
But the explanation there is for integration into a forum- do you know how it could be used in  a site as well?

And actually, I was looking at how it closed-
Quote from: akulion on September 23, 2006, 07:13:41 PM

BLocks can now be closed! :D
One down - 3 to go!!!!

I will update the code in post 1 eventually but for now just a short note:

To allow the block to close do this:

To one of the 3 DIVs add an ID tag like so:

<DIV ID='dwindow'

Then where the TITLE of the block is declared - put this bit of code:

TITLE HERE<a href=="closedr.gif" onClick="closeit()">

Then open the PHP file and AFTER line 93 add this:

function closeit(){
document.getElementById('dwindow').style.display='none'

Finally upload this image to your forum root as well

And thats it!!! Now when you click the lil X button in the header of your block it will close!

I'm still trying to figure out how to include the function for all 3 divs...
Figured out :D

how could this be done for any old content box on a site? The same way?
<a href=="closedr.gif" onClick="closeit()"> ?

Thanks

akulion

yup exactly the same way

all u basically have to do is include the closit function in the PHP file u download

and then u call it in the button code inside the DIV