Showing posts with label CSS. Show all posts
Showing posts with label CSS. Show all posts

Monday, May 19, 2008

My MySpace Profile Is Open

I finally made my MySpace profile public. If you want you can check it out at www.myspace.com/bvanscoter...

I think I out-did myself with the cool theme that I applied to it... I created the images and decided to go with a Bleach theme for it (at least for now).

I'm a little into that show!

I really like how this video puts together a bunch of scenes from Bleach to some killer music:

Bleach - Ichigo's Resolve

As well, I thought this video was quite sweetly put together... because it goes so well with the story-line of the series:

Bleach - Red September

After having my profile closed to public viewing so I could get it all themed properly with CSS and what-not... I finally made my profile public.

Which means you can view my profile without any limitations right now!

And while you're at it go ahead and add me as a friend!

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2008/05/my-myspace-profile-is-open.html

Wednesday, March 12, 2008

New Blog Design

Today I finally was able to work through and put together phase two of my site design, and that was of redesigning this blog's site template.

I made the site template of this blog much like the template of my website at www.benjaminvanscoter.com, by taking the template and style that I was using and modifying it to fit within the template I have on my site.

Sure, it might not be perfect or all that glamorous... (as I think of that terrible PCD or whoever sings it song)... but it looks good and will do the job for the time being.

Now I can work on posting about a lot of the stuff that I've been holding off on!

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2008/03/new-blog-design.html

Thursday, November 8, 2007

Browser Oddities... Going Insane

Today I was working on creating a template for the new site I'm creating for my cousin's insurance company, VanScoter Insurance, LLC.

But there were several things about CSS and various browser oddities that were quite simply driving me insane to try to get the stuff to display correctly!

The first thing that was bothering me was figuring out how the heck to get Internet Explorer to center a container "div" tag... a <div id="container"> that encompassed all the of the pages contents.

Obviously <div id="container"> was inside the <body> tag

Through a ton of trial and error and examining other style sheets I finally figured out what was required to get the container to center in the window.... using css:

body {
    /* whatever params */
    text-align: center;
    /* any other params */
}
#container {
    /* whatever params */
    text-align: left; /* for inheritance purposes */
    margin: [top] auto [bottom?];
    /* any other params */
}

The left and right margins can be centered on Mozilla engines using auto... but for some reason Internet Explorer needs to have the text-align: center; property set in the body (which really isn't technically the right use or interpretation of the property).

Also, because of inheritance in CSS, if you don't want everything on your page to be centered you'll need to redefine text-align to be left or whatever else when defining your container id's properties.

I was glad when I figured that out... cause it was a problem that I hadn't been able to figure out since I started re-doing my cousin's website.

The second thing that was bugging the heck out of me was how the CSS float property was interpreted in the Mozilla engine... particularly with nested elements.

Mozilla does a really strange thing when interpreting the nested divs when floating them, take a look...

Here's the basic HTML background:

<div id="container">

<div id="sidebar">
<p>Many</p>
<p>....</p>
<p>Many</p>
<p>Lines</p>
<p>of</p>
<p>Contents</p>
</div>

<div id="main">
<p>Not as many lines</p>
<p>of contents.</p>
</div>

</div>

Now if you do something like this in CSS:

#sidebar {
    /* whatever params */
    float: left;
    /* any other params */
}

As long as there are more lines in the <div id="sidebar"> tag, you will wind up with something that like this when rendered in the Mozilla engine:

As you can see the <div id="container"> doesn't continue to the bottom of the <div id="sidebar">, but merely just ends wherever the <div id="main"> ends.

Thanks to this forum thread / post by Variable, I got the solution to this problem.

All it takes is an extra line or two to get it to work!

Here's the new HTML (changes bolded):

<div id="container">

<div id="sidebar">
<p>Many</p>
<p>....</p>
<p>Many</p>
<p>Lines</p>
<p>of</p>
<p>Contents</p>
</div>

<div id="main">
<p>Not as many lines</p>
<p>of contents.</p>
</div>

<div id="fillcontainer"></div>

</div>

And here's the new CSS (changes bolded):

#sidebar {
    /* whatever params */
    float: left;
    /* any other params */
}

#fillcontainer {
    /* whatever params */
    clear: both;
    /* any other params */
}

And now you will correctly have something that looks like it should:

Internet Explorer would render it like the above picture without the addition of the <div id="fillcontainer"> and the extra CSS code.

At least Internet Explorer correctly nests div tags when they're floated, unlike Mozilla... which is the only one thing I can think of that Microsoft has ever done right!

It might be simple, but you want everyone to see the website you create the same no matter what browser they use -- and it's stupid little browser oddities like this that drive people like me insane!

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2007/11/browser-oddities-going-insane.html

Friday, October 5, 2007

Genius Work-Around

Like I was saying in this post I started working on this cool little script in JavaScript that moves HTML objects around on a website, a really cool script overall for all sorts of floating message effects....

And after I got home from work a little after 7:00 AM this morning I have been working on giving it classes to be smart... actually, to move more than one HTML object around in a totally customizable fashion.

However, when doing such I ran into a little problem... apparently a problem a lot of people have with Classes or Objects and the setInterval() method...

Especially when you try to do this:

setInterval("ObjectName.methodName()", this.pinginterval);

Which made making my script work with classes a whole lot harder than I thought it was going to be!


And Nothing Here Is Or Was Helpful!

So I found my own super-Genius - with a capital G - workaround!!!

Instead of doing this ...

setInterval("ObjectName.methodName()", this.pinginterval);

... I did this ...

setInterval("functionName('"+ObjectName+"')", this.pinginterval);

This works for me because my Classes or Objects are in an array:

var Objects = new Array('ObjectName1', 'ObjectName2', ... 'ObjectNameN');

So as long as I kept passing the ObjectName as a parameter to each subsequent function I could then call anything I want from the Class or Object simply by using:

Objects[ObjectName].Paramater

What tripped me up and had me pulling my hair out trying to figure out what was wrong with a particular line I typed, was a simple syntax error - when I typed:

setInterval("functionName("+ObjectName+")", this.pinginterval);

Instead of typing:

setInterval("functionName('"+ObjectName+"')", this.pinginterval);

Did you see it?

I forgot to include the single quotes around the function's parameter...

So basically when the line I typed was processed by the browser it would have seen functionName(strObjectName); instead of functionName('strObjectName'); as it should be in proper syntax.....

A stupid mistake that sent me hunting and trying to figure out what was wrong with it for about a half hour!

And now after I finished the script the time is 3:30 PM

I've been working on it for about 7½ hours. (Once you factor in eating and watching TV for a bit as I pulled my hair out to find a solution!!)

This all just goes to show one thing....

I AM A GENIUS!!

And that's final!

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2007/10/genius-work-around.html

JavaScript Action Text

I am working on this cool little script in JavaScript that will move HTML objects around on a website, a really cool script overall for the unblockable 'pop-up' floating messages and other really cool object moving uses.

I am going to be using this script on the new website I am creating for my cousin's insurance agency (VanScoter Insurance Agency) to create something that looks like the moving text on Noto Insurance's website... but the major difference is that with the script I am making it won't use flash, which is harder for search engines to read and index, and will load faster.

But, to make so that it can move multiple HTML objects on the same page that are different CSS Classes (which is how each object is identified on the page) I am needed to figure out how to use classes in JavaScript.


Web Developer's Journal

So when researching how to create and use classes I found this Tutorial on WebDevelopersJournal.com that describes how to create functions and classes...

And as it turns out, classes are easier to define and create in javascript than I thought they would be.

So once I get home (I'm doing this post at work - The Ridgemont Wegmans) I am going to fix up my script.

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2007/10/i-am-working-on-this-cool-little-script.html

 

pages

legal information

privacy policy

We respect your privacy and promise to never sell, barter, share or rent your information to any unauthorized third party. By providing your contact information you are also requesting and agreeing to receive important information about future events. (You may unsubscribe at any time.)
view full privacy policy here

certification of authenticity

I certify that the information contained on this site is true and complete to the best of my knowledge and understanding, any discrepencies will be governed by the terms of use.

terms of use

Everything we provide is provided "as is" including but not limited to the implied warranties of merchantability or fitness for a particular purpose, without any promise or guarantee of earnings. All forward looking statements on any of our materials are intended as an expression our opinion and will not responsible for any incidental or consequential damages from your actions.
view official terms of use