Go Back   BioRUST Forums > Blogs > sami1337

Rate this Entry

return false; / validated

Posted 10-30-2008 at 11:27 AM by sami1337

A while ago U'ziel said in my thread that i should (could) use a return false; for my expanding menu. I asked what it does, and he explained it, kinda. So i put it in a portion of my menu and didn't find out it's use. Nothing significant happened. But i never removed it.

So, while testing it in internet explorer i found that it deals with the buttons as links (duh they are hrefs), but firefox does not. But i just found out that one of my sub menu's expanded just as i wanted it to! It doesn't have the "click" sound, it doesn't change layout because it's changing page (#) and it didn't requireme to use #top to stop the page from scrolling down on expansion. That was thanks to the return false.

Thanks U'ziel!

Oh and yesterday i validated my page(es). I kinda messed up on the doctypes. I had mine placed inside the <head> tags. So after fixing that i thought i had to use a strict doctype, but apparantly i need to use a loose one.
That is fixed now, and i only got like 5 errors and 10 warnings.The other page had 120 warnings and about 11 errors, but that was thanks to the text i copypasted in. Both pages have 0 errors and 0 warnings now. And both pages have valid css.

The css might have been valid, but i still want a neat page code wise. I had used loads and loads of inline styles. It just had to go wrong at some point really. And it did. For some reason i could not figure out, one of the menu content divs didn't show the right padding.
Happens when you say one thing in the inline css, and the other in the style sheet. So i simple removed all inline css in all the divs that shared the same style, and gave them a proper class. Now it works, and i can easily change it, and find it. Haha.

As a bonus i am adding comments to make it even easier. Gotta make sure the folks here know what to do, even if they break something. If they can't find where they have to paste something then it's pretty useless i guess. But it also helps me.

Oh and a little question to whoever reads this.

What do you prefer for your css layout.

A.
Code:
<style type="text/css">
a{text-decoration:none;}

table.outer { position:relative;left: 30px;}


table.bg {background-image:url(cornerimg.png); background-position:right bottom; background-repeat:no-repeat;}

table.bg_menu {background-image:url(menu_bg.jpg); background-position:left bottom; background-repeat:no-repeat;}
        
body,td,th {font-family: Arial, Helvetica, sans-serif;}

body {background-color: #CECEAB; margin-left: 30px; margin-top: 0px; margin-right: 30px; margin-bottom: 0px;}

.style2 {font-family: Arial, Helvetica, sans-serif}

a.style3 {color: #FFFFFF; font-weight: bold; font-style:normal; text-decoration: none}

a.menu_sections{display: block; height: 100%; width: 100%; text-decoration:none; color:#FFFFFF;}

.menucontent {position : relative; left : 0px; top : 0px; bottom:0px; text-decoration : none; width : 175px; padding-right:0px;}

</style>
or

.B

Code:
<style type="text/css">
a{
text-decoration:none;
}

table.outer {
position:relative;left: 30px;
}


table.bg {
background-image:url(cornerimg.png); background-position:right bottom; background-repeat:no-repeat;
}

table.bg_menu {
background-image:url(menu_bg.jpg); background-position:left bottom; background-repeat:no-repeat;
}
        
body,td,th {
font-family: Arial, Helvetica, sans-serif;
}

body {
background-color: #CECEAB; margin-left: 30px; margin-top: 0px; margin-right: 30px; margin-bottom: 0px;
}

.style2 {
font-family: Arial, Helvetica, sans-serif
}

a.style3 {
color: #FFFFFF; font-weight: bold; font-style:normal; text-decoration: none
}

a.menu_sections{
display: block; height: 100%; width: 100%; text-decoration:none; color:#FFFFFF;
}

.menucontent {
position : relative; left : 0px; top : 0px; bottom:0px; text-decoration : none; width : 175px; padding-right:0px;
}

</style>
I now use the first layout simply because it doesn't use as much space. If one class has like a massive ammount of content then i'd give it the second layout.
Posted in Uncategorized
Views 378 Comments 2 Email Blog Entry
« Prev     Main     Next »
Total Comments 2

Comments

  1. Old Comment
    U'ziel's Avatar
    Thanks I thought I had explained it quite well! I prefer B simply because I find it easier to read and follow.
    permalink
    Posted 11-09-2008 at 11:06 AM by U'ziel U'ziel is offline
  2. Old Comment
    Yeah you did, but i still was not entirely sure of it's use. Now i am though.

    I must say that after making the css external i quite prefer B now.
    permalink
    Posted 11-10-2008 at 07:27 PM by sami1337 sami1337 is offline
 

All times are GMT +1. The time now is 08:01 AM.

Powered by vBulletin Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT