Jump to content

sbrownii

Members
  • Posts

    137
  • Joined

  • Last visited

Everything posted by sbrownii

  1. Maybe you should do a search for "javascript ticker"
  2. I think you would learn a lot better from studying and writing it yourself.No... I KNOW you would learn better that wayThe general idea with the javascript marquee is to have a div and use the HTML DOM to read and set its style.left attribute in order to move it across the screen. I'm sure you are intelligent enough to figure out the details and get it working with FirefoxIt isn't a new thing...
  3. First, setting absolute positioning isn't a reliable way to get a good 3 column layout.So take out the absolute positioning for "leftcontent", "centercontent" and "rightcontent"Then set the "float" attribute on those three to "left";You will need to set a width for "centercontent" (I went for 669px) and remove the definition for margin-left and margin-right on "centercontent"You also have an extra closing tag for a div element. Find it and take it out (it is at the close of the "leftcontent" div element).In your style sheet change the width of the ticker to 953px and the height to 20px (to match that in the javascript so the border will show!)In the javascript change "marqueewidth" to 953pxNow you need to get the color for the <hr> elements to work. just change your style definitions for the hr element to this HR { COLOR: #1e3276; background: #1e3276; height: 2px; border: none;} It won't affect the layout, but it would be nice if you consolidated your definitions for borders - you defined each border separately - and for each element - and they are all the same!Anyway... I think that's it.Have a great day.
  4. IE doesn't have a bad record when it comes to supporting the standard. Some things we use often aren't exactly the standard, and also sometimes the standard itself leaves some room for the browser developers to decide exactly how something must work.The biggest problem with IE has been that Microsoft constantly ADDS support for things that are not the standard and encourages people to develop using those things, which then obviously don't work anywhere else.IE is huge, firefox is new, and it has its own problems.There are a lot of things I prefer about firefox, but in the past IE has been ahead of the game alot of times when it comes to certain standards.Of course, I often wonder why w3c keeps adding new standards before the browsers are able to catch up...Anyway... its a good idea not to make the browsing experience negative for IE users, since they make up a HUGE bit of the market
  5. Wow... somebody needs a nap... lolI did find it strange that if visiting the site using IE you are given this message It does give you the choice to continue without FF though...The point is to support all browsers! not just not to support IE!
  6. search the net for "css 2 column layout"( Tables are the anti-css so I have to show you how to do it the right way... lol )You will find many things to look at - so look through them, try to use them, and if you have problems ask back here.A short summary of the general idea is to use to div elements for your two columns (I just call them left and right here). Then put your rows for the second column inside the div that represents the second column.For example: <div class="left"> left column</div><div class="right"> right column <div class="row">Row 1</div> <div class="row">Row 2</div> <div class="row">Row 3</div></div> After you have that general structure, adapt some of the ideas you find in your search.This is a very, very simple 2 column layout with borders so you can see where things end up: .left{float:left;margin:0px;border: solid red 2px;width:20%;}.right{float:left;margin-left:0px;width:80%;border: solid orange 2px;}.row{border: dashed black 2px;margin: 5px;margin-bottom: 20px;} Just add definitions for font "color", "background" color, padding, etc...To get your headings for each row just put them in some block level element inside the div for that row. You could try h3 or just a div if you want. Either way, if you set the class attribute on your row headings you can use the following to get them to align right .row .header{margin: 2px 0px;text-align:right;}
  7. The original SQL would be helpful...In one of the statements you provide you are summing columns (BTW it should be "group by" not "groupby" , in another setting the city for a customer....Also if you in your update statement, you aren't actually allowed to SELECT from the same table you are updating.Also, '(select sum(col_2) from table_name groupby col_1)' will not return what you are expecting... remove those single quotes!Won't col_1 always be equal to itself?As for your syntax error, please show us the statement you are using!!Again, you should remove the single quotes, or you will not get the value you expect!If you are having problems we need to see the actual SQL statements you are using.
  8. sbrownii

    syntax

    Sorry... I can't stop laughing....
  9. sbrownii

    Java loop

    I would hope that even for the cheesiest hacker game the password wasn't actually "PASSWORD" !!!
  10. My comment was based on my first impression when I read through your style definitions trying to find what might be causing the problemMy point was about the repetition in the style definitions - not about the actual appearanceFor example you have definitions for things like #opiniongif, #picweekgif, #historygif, #downloadgif, #newsbargif ... ... where you define about 9 attributes for each, but the only thing different in all of them is the url of the background image!Those other 8 attributes should be pulled out into a class selector - maybe ".backgroundgif". A less desirable method is instead of adding a class which they all logically belong to, just have a definition that defines the common attributes for all (by listing id), then define the background one by one in separate definitions for each id.It seems you intend for those to look the same anyway, so currently when you decide to make any change, you have to change all of them! That would be +10 lines (depending how you type it in), -24 ---> a total difference of 14 lines? just by this simple change - not changing the actual display at all. And there are more examples of this in infoshop.css!It's not just about size though, it is about grouping things and avoiding creating a complete set of rules for every individual element when possible. Such organization will help you reuse and maintain designs - and more particularly fix problems. I'm not saying don't use the id selector for anything though...You should try to make style definitions by thinking of groups of items (classes) more than thinking about how you want each individual element to work. This makes it easy to change the overall look later - and even take bits from past work and reuse it.I guess the other point I was making was noticing all the "tricks" being used for browser compatibility. There is a common set of css that works the same in most browsers, its just been overrun by tricks. Some layouts might be more complicated than that common set, but sometimes they can been simplified to a compromise. There is a similar problem with Javascript and browser detection. I have seen many scripts checking for browser type either in unreliable ways (ones that exclude browsers other than FF, IE and opera), or checking when they are doing things that could be rewritten to be cross-browser compatible. Anyway... that's me...Either way the end the page looks good- Goodwork!
  11. But it does work...What do you mean by "it does not work"?Try changing the script in content.htm to this: function getUrlAnchor(url){ url = ""+url; aIndex = url.lastIndexOf( '#' ); a = ( aIndex > 0 ) ? url.substring(aIndex, url.length) : ""; return a; } function moveToAnchor(anchor){ window.location.replace( window.location + anchor ); } function moveToParentAnchor(){ parentAnchor = getUrlAnchor( window.top.location )+ ""; thisAnchor = getUrlAnchor( window.location ) + ""; if( parentAnchor != thisAnchor && parentAnchor != ""){ moveToAnchor( parentAnchor ); } } The first two functions stay the same as before (except using replace instead of assign)...Now, for content.htm, set the onload attribute of the body tag to "moveToParentAnchor()" like this <body onload="moveToParentAnchor()" > I tested the original on my localhost, which is quick, so there was no problem. But I guess when the pages are on the web they take a little longer and the browser wasn't dealing with it well. I tested the version making use of the body tag's onload attribute on the web and it works fine(a working copy of your pages with the script added can be found herehttp://brown.50webs.com/test/frame_anchor_url/frontPage.htm )Sorry for the oversight, hope it works for you this time. If not, let me know...BTW... You previously tried using the target attribute of the <a> tag, but that will not work because that target doesn't even exist until the next page is loaded - so your frontPage.htm has no way to be aware of the individual frames in the next page.
  12. The AJAX tutorials now work in FireFox... although it seems it may have been firefox's own fault...???Following is part of a communication I a receive regarding the problem and its solution Not totally sure what the rules are for request sent by XmlObjects - not sure its very standardized. Either way, I know that checking for referrer is not a reliable security measure. I don't know if the browser is responsible for generating all parts of the http header, or if it is left to the coder....Anyway, it works for now..
  13. Is this post continued from somewhere else? I'm totally lost!A link to the code in action(helpful), posting the actual code (not as helpful) or important parts (helpful when combined with link to working pages) would be nice.In general you can affect margins using css attribute called... hey, what do ya know... marginLook in the css reference or tutorials for more.Until I know more what you are talking about I can't be much help...
  14. sbrownii

    Java loop

    I must admit, I don't understand your goal... but to make that text "clickable" just change document.write ("www.awebsite.com" + i) to var address = "www.awebsite.com" + idocument.write ("<a href='"+address+"'>"+address+"</a>") As far as "auto opening" instead of writing the address as a link (using the <a> tag), you could open the pages into a new window, or into a frame, or something, but then you might end up with 50 popups!!
  15. I don't know of any way to do it without some kind of scripting - but just because I don't know it doesn't mean there isn't one.If you add this script to your content page, it will check the parent's url for an anchor and use it on itself <script> function getUrlAnchor(url){ url = ""+url; aIndex = url.lastIndexOf( '#' ); a = ( aIndex > 0 ) ? url.substring(aIndex, url.length) : ""; return a; } function moveToAnchor(anchor){ window.location.assign( window.location + anchor ); }parentAnchor = getUrlAnchor( window.top.location )+ "";thisAnchor = getUrlAnchor( window.location ) + "";if( parentAnchor != thisAnchor && parentAnchor != "") moveToAnchor( parentAnchor ); </script> Just paste the above code between the <head> tags of content.htmHopefully someone else might have heard a way to do it without using scripts...
  16. Whatever happened to simple and concise ... and maintainable .... .... anyway...There are cleaner ways to do this (your site), but keeping with what you are doing...use your * html wackiness like this * HTML DIV#center { width: 100%;} You might think of learning the habit of using lower case tags...
  17. Is your flash footer the gif????If it is real flash, how did you go about embedding it in your page?Is your page on the web???I did notice that commenting out your definitions for "top" makes a difference. What are you meaning to do by setting top? I am thinking you would be better off setting "margin-top" to accomplish any spacing. If I leave top set to 35px for the div containing the flash footer then the bottom of the footer gets cut off.I tried applying your style to a page where there is enough content to scroll and didn't have a problem with the flash begin cut off...Perhaps you can provide the markup you are using?
  18. sbrownii

    Dynamic Gallery

    To get them to show up as images just use the values stored in your array as the src for your img tagsyou can use foreachYou could also just print out the img tags as you loop through the directory, instead of repeating the looping process again to go through an array.So instead of putting the images in an array you could just do this: if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if(($file != '.') && ($file != '..')) { echo "<img src='$file' alt='Photo of something' />"; } } closedir($dh); }} If you want to use an array (so you can print them in reverse order) then just write the image tag while looping through the array somewhere else.I guess it would turn out to be something like foreach($img as $img_file){ echo "<img src='$img_file' alt='Photo of something' />";} Hope I remembered my php right... It's been a while...
  19. Glad to hear it worked...
  20. I was looking through your markup and you have forgotten to close several tags and left off the alt attribute of some images. You might try to fix such mistakes first.I looked at your css, too. As far as the page you linked to, your css is way way way too complicated for getting such a simple layout to work. I was trying to look through to find what might be wrong when I noticed the use of expressions. I have done a lot with cross-browser compatibility and never found the need for those things. In my opinion, when you find the need for such things, you really need to stop and think about what it is you are doing.I realize your style sheet included rules for things on other pages, but still...I think you are trying to go for a layout similar to what I used on this site http://skb.glwb.info/news/index.php (warning, if you click links there, my host will bombard you with popUNDER ads!!!!)If that is the type of layout you are going (without the lame injected ads of course...) for, then trust me, you don't even begin to need the tricky stuff you are using.I would seriously recommend you start your css over. If nothing else, start it over for the parts not working in IE, and try to use the most browser friendly style definitions you can. There are many sites with documentatino of good, clean style definitions.You might find it helpful to link a few different stylesheets so you can keep related rules together. Perhaps you could put all style definitions specific to your tour links in one file and just work on that file.After I cleaned up your markup, commented many width definitions in css, and got it to display properly in Amaya, I found that IE wouldn't show it at all anymore. If you can, avoid any layout that requires you to use too many tricks. The truth is though, most layouts can be accomplished just fine without many tricks.Anyway... sorry I am not much help. If I were in your position I would certainly extract all definitions dealing specifically with my problem areas to a separate file and start those definitions from scratch.
  21. sbrownii

    Firefox problem

    Isn't it cool to see members rated as "newbie" answering the questions of those rated as "advanced members"... kinda funny how forums always do that...anyway... happy to help
  22. lol...it seems to look fine in firefox... until you go and look at it in IE....You have managed to render your css pointless...If you use css, please don't use the attributes width, height, bgcolor, etc in your html tags. You should in fact be aware that those attributes are not valid for some tags anyway. (for example td tag : http://www.w3schools.com/tags/tag_td.asp read deprecated as DO NOT USE)It is a mess... you should use css to define all your style rules in one place so you can make your changes easier!Anyway... that is just politics I guess..On to getting the results you want (with probably twice the code you need... but... yeah... off the politics...)...The problem is with how you defined your colors. When you use the hexcode triplets to define a color you must precede the numbers with the pound/hash/(whatever else you call it) character. It is a little tricky for the browser to make sure that you put the # so IE is lazy and just assumes - they don't do this to make things easier on you.. trust me.Anyway... to fix your problem just do search and replace in your html file (unless you plan to pull out the color definitions and put them in css, then just make sure you define the colors correctly in css)...replace .navcell2 a:link { color: #FFFFFF; text-decoration: none; line-height: 30px; display: block; background-color: #99CCCC;}.navcell2 a:visited { color: #FFFFFF; line-height: 30px; display: block; text-decoration: none; background-color: #99CCCC;}.navcell2 a:hover { color: FFFFFF; text-decoration: none; line-height: 30px; display: block; background-color: 999966;}.navcell2 a:active { color: FFFFFF; text-decoration: none; line-height: 30px; display: block; background-color: 999966;} You could easily shorten by taking all the common things and define them using the selector ".navcell2 a" like this: .navcell2 a{color: #FFFFFF; text-decoration: none; line-height: 30px; display: block;}.navcell2 a:link { background-color: #99CCCC;}.navcell2 a:visited { background-color: #99CCCC;}.navcell2 a:hover { background-color: #999966;}.navcell2 a:active { background-color: #999966;} You could even combine the defintion for a:link and a:visited because they are the same.... and so on...I only mention this because you will need to go through your style sheet anyway, you might want to clean it up so it is easier to work on later!Anyway... hope this helped...
  23. The width property does't work on inline-elements...It does work on block elements...That's why when you set display to block the width works as you wantedsee more: http://www.w3.org/TR/CSS21/visudet.html#propdef-widthWhy are you wanting to change the width?Changing size in any way on hover may make it difficult for the user. I have seen many sites try to use this, and I have a hard time clicking on what I intended to click on.But, if you really want to... try the padding propertyHere is one way you could use padding: a:hover {text-decoration:none; color:red; background-color:green;padding-left: 2em; padding-right: 2em;} You can change the value "2em" to whatever you like - you don't have to use "em" as your unit either.If you really want to mess with your visitors then use the margin property (just change padding-left and padding-right to margin-left and margin-right) - it gives a pretty wacky effect in firefoxHope that helps you in your combat against usability... lol... just kidding... kind of...
  24. sbrownii

    Firefox problem

    Aphotic mentioned using units instead of a percentage for the width... The problem is not with the td, but with the styles you definedIt is in your style definition!Try changing the width on the "a.menu" from 100% to 100px /* Menu */a.menu {font-family: arial; font-size: 12pt;color: black;text-decoration: none;background-color: #F08A38;padding: 2px 8px;width: 100px;float: left;}a.menu:hover {background-color: #FAAA50;}.border {border: 1px solid black; background-color: #F08A38;margin: 0px;padding: 0px;}td.menu{width:100px;} also... don't set width of the column explicitly in the html. Rewrite that td as <td class="border menu" valign="top"> This is possibly not the best fix, but it works in my version of firefoxIn the future you might try to make more use of the "em" unit. This be helpful because "10em" should leave room for 10 characters. This way the menu fits the items even if the user needs to use larger fonts (because they can't see well....) - you can usually test this by holding ctrl key while rolling the mouse wheel.Anyway...Have a nice day
×
×
  • Create New...