Welcome Guest ( Log In | Register )

 

Entries in April 2008

 | Category: web design
entry 13 Apr, 2008 - 09:09 AM
This technique uses HTML and Javascript.

The code:

Javascript (in your header or an external file):
CODE

<script type="text/javascript">
function toggleDiv(divid){
    if(document.getElementById(divid).style.display == 'none'){
      document.getElementById(divid).style.display = 'block';
    }else{
      document.getElementById(divid).style.display = 'none';
    }
  }
</script>


HTML:
CODE

<a href="java script:;" onmousedown="toggleDiv('mydiv');">Click here for more info!</a><br />
<div id="mydiv" style="display:none">
Here's the hidden text!
</div>


See it in action here!

Entries in March 2008

 | Category: web design
entry 24 Mar, 2008 - 05:43 AM
A cute little menu technique with no javascript!

The CSS code:
CODE
body {
background-color: #ffffff;
}

div.nav1 {
height: 50px;
width: 150px;
margin-top:15px;
padding:0;
background-image:url("img/btn_down1.png");
}

div.nav1 a, div.nav1 a:link, div.nav1 a:visited {
display:block;
}

div.nav1 img {
width:100%;
height:100%;
border:0;
}

div.nav1 a:hover img {
visibility:hidden;
}

div.nav2 {
height: 50px;
width: 150px;
margin-left:153px;
margin-top:-50px;
padding:0;
background-image:url("img/btn_down2.png");
}

div.nav2 a, div.nav2 a:link, div.nav2 a:visited {
display:block;
}

div.nav2 img {
width:100%;
height:100%;
border:0;
}

div.nav2 a:hover img {
visibility:hidden;
}

div.nav3 {
height: 50px;
width: 150px;
margin-left:306px;
margin-top:-50px;
padding:0;
background-image:url("img/btn_down3.png");
}

div.nav3 a, div.nav3 a:link, div.nav3 a:visited {
display:block;
}

div.nav3 img {
width:100%;
height:100%;
border:0;
}

div.nav3 a:hover img {
visibility:hidden;
}

div.nav4 {
height: 50px;
width: 150px;
margin-left:459px;
margin-top:-50px;
padding:0;
background-image:url("img/btn_down4.png");
}

div.nav4 a, div.nav4 a:link, div.nav4 a:visited {
display:block;
}

div.nav4 img {
width:100%;
height:100%;
border:0;
}

div.nav4 a:hover img {
visibility:hidden;
}

div.nav5 {
height: 50px;
width: 150px;
margin-left:612px;
margin-top:-50px;
padding:0;
background-image:url("img/btn_down5.png");
}

div.nav5 a, div.nav5 a:link, div.nav5 a:visited {
display:block;
}

div.nav5 img {
width:100%;
height:100%;
border:0;
}

div.nav5 a:hover img {
visibility:hidden;
}


The HTML code:
CODE

<div class="nav1">
    <a href="#"><img src="img/btn_up1.png" width="150" height="50" alt="" /></a>
</div>
<div class="nav2">
    <a href="#"><img src="img/btn_up2.png" width="150" height="50" alt="" /></a>
</div>
<div class="nav3">
    <a href="#"><img src="img/btn_up3.png" width="150" height="50" alt="" /></a>
</div>
<div class="nav4">
    <a href="#"><img src="img/btn_up4.png" width="150" height="50" alt="" /></a>
</div>
<div class="nav5">
    <a href="#"><img src="img/btn_up5.png" width="150" height="50" alt="" /></a>
</div>


Each button consists of two images. These images need to be the same size. Also, the CSS images are static - they are always there - they are simply covered by the HTML image on mouse-over. This could make for some interesting effects using transparencies and backgrounds.

Two samples of this code in action can be found here.

Happy coding!

 | Category: drivel
entry 13 Mar, 2008 - 04:45 AM
There I was.. browsing, lounging, reading, replying.... doing my daily DIC thing. When my husband pulled his chair up behind me and ask what I was giggling about.

I showed him a post that had tickled me funny. He cocked his head to the side, arched his eyebrow - just one, shook his head and rolled back to his desk.

Within 30 seconds, he was behind me again. "I take it this is where the nerds hang out?"

"I suppose you could put it that way," was my reply.

At this point, he leaned forward, kissed my forehead and muttered something about his disbelief that he - Mr. High School Jock - could end up with me - Ms. Chess Club President. He then rolled back over to his desk to pretend he was disinterested.

When I turned around 20 minutes later, he was sneaking his own peek at the site and quickly closed the window when he realized he'd been caught.

Closet Nerds: The REAL threat to technology as we know it. tongue.gif

 | Category: web design
entry 12 Mar, 2008 - 05:52 AM
Looking for an easier way to update site information or change fonts or text colors and sizes in your Flash site?
This is one possible solution:

First, create a text file containing your link names and site text:

CODE
&txt1var=Link 1
&txt2var=Link 2
&txt3var=Link 3
&txt4var=Link 4


&files1=<font face="Arial"><font size="15"><font color="#003060">
Add text here.  With wordwrap and multiline functions enabled in the ActionScript, this text should wrap around the text area as it would in a CSS container on an HTML page.  With HTML set to True, the bracketed information on font sizes and colors should also work in your Flash presentation.

&files2=<font face="Tahoma Bold"><font size="25"><font color="#ff0000">
Add a bunch of junk related to your second link here.

&files3=<font face="Impact"><font size="15"><font color="#ff00ff">
Add more junk related to your third link here.

&files4=<font face="Arial"><font size="12"><font color="#003060">
Add junk related to your fourth link here.  And so on and so forth.....


Then add the following ActionScript to your Flash frames:

CODE
loadVariables("text.txt",_root);
_root.createTextField("frmInfo",1,169,60,362,361);
frmInfo.multiline = true;
frmInfo.wordWrap = true;
frmInfo.border = false;
frmInfo.html = true;
frmInfo.type = dynamic;
frmInfo.selectable = false;
frmInfo.background = false;
frmInfo.font = "Courier New";
frmInfo.variable = "files1";
stop();


Change the variable in the ActionScript for each frame (ie, "files1", "files2", ..."files853"..., etc.) to point to the variable name in the text file containing the information you want to appear in that frame.

To dynamically load the link names, you will need a button with a dynamic text area on top. In the sample linked below, I used green background rectangles for my buttons. Be sure your text area variable names are set to the same variables used in the text file (in this example "txt1var", "txt2var"....) and set each button action to go to the frame you would like them to display (ie, when you press button 2, it goes to frame 2, etc). The font size, style and color for the dynamic text areas need to be changed in the element's properties in Flash. You cannot use the text file to change these details for dynamic text.

I hope this makes sense as I am horrible at explaining things.... I am hoping the blog will help me to improve this very weak skill.

Anyway, you can see this technique in action here.

 | Category: web design
entry 4 Mar, 2008 - 05:38 AM
This technique is pretty simple, but I love the effect and thought I'd share it. You can see the final product here.

Here's the code to accomplish the look:

CSS:
CODE
body {
background-color:#FFFFFF;
color:#000000;
margin:20px;
text-align:left;
}

#wrapper        
    {position: absolute;
     top: 50%;
     left: 0px;
     width: 25%;
     height: 1px;}

#content
    {margin-left: 0px;
         position: absolute;
     top: -200px;
     left: 50%;
     width: 700px;
     height: 300px}

.bgtext                     
    {font-size: 100px;
     position:absolute;
     top:120px;
     left:0px;
     color:#1d243a;
     font-family:verdana, helvetica, sans serif;}

div#link1, div#link2, div#link3, div#link4
         {color:#767f9a;
          font-family:verdana, helvetica, sans serif;
          position:absolute;}

div#link1 {font-size:40px;
        top:75px;
        left:100px;}
        
div#link2 {font-size:50px;
        top:25px;
        left:300px;}
                
div#link3 {font-size:30px;
        top:275px;
        left:50px;}
            
div#link4 {font-size:60px;
        top:275px;
        left:250px;}

div#content a span {display: none;}

div#content a {text-decoration: none;
         color:#767f9a;}

div#content a:hover span {display: block;
            position:relative;
            background:none;
            font-size:14px}
            
div#urltext, div#content a:link
            {color:#767f9a;}

div#content a:visited, div#content a:hover, div#content a:hover span
                {color:#a4abc1}


HTML:
CODE
<html>
<head>
<link href="style1.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
  <div id="content">
    <div class="bgtext">Page Title</div>        
<div id="link1"><a href="#">Link 1<span>– Extra text</span></a></div>

<div id="link2"><a href="#">Link 2<span>– More extra text</span></a></div>

<div id="link3"><a href="#">Link 3<span>– Extra text again</span></a></div>

<div id="link4"><a href="#">Link 4<span>– Last time, more text</span></a></div>            
            
    </div>
  </div>
</div>
</body>
</html>


I use a slightly modified version of this technique on my personal site, you can check it out here if you want.

 | Category: drivel
entry 3 Mar, 2008 - 09:28 AM
Woohoo! I gots a blog for all my nerdy moments! Yay DIC!

 
SMTWTFS
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

Categories

My Blog Links

Last entries

Last Comments

Search My Blog


0 user(s) viewing
0 guest(s)
0 member(s)
0 anonymous member(s)