Xepher.Net Forums

Xepher.net => Technical Support => Topic started by: schwarzkreuz on August 03, 2008, 09:35:38 AM

Title: Why not another news box question!
Post by: schwarzkreuz on August 03, 2008, 09:35:38 AM
I just noticed that my site doesn't display the banner or news box or anything xepher related. It used to display fine I guess it must have stopped since I've been updating but I don't know what i might have done. I haven't changed that section of code since I started here.

Did I miss something regarding this? If so can anyone help me out?

Title: Re: Why not another news box question!
Post by: Xepher on August 03, 2008, 10:48:31 AM
The newsbox/banner code hasn't changed since the new server. However, if it's really been that long since it worked, check http://xepher.net/help.php for instructions concerning the current box. If that doesn't help, post a link with the page you THINK should work, and then I can determine what's wrong.
Title: Re: Why not another news box question!
Post by: schwarzkreuz on August 14, 2008, 02:40:21 AM
Got it working, now I'm just having trouble centering it.
Title: Re: Why not another news box question!
Post by: schwarzkreuz on August 14, 2008, 02:45:54 AM
Never mind. I got it.
Title: Re: Why not another news box question!
Post by: Miluette on August 16, 2008, 04:39:47 PM
I tend to have trouble centering the Xepher box and other things, too. In fact, concerning things like that, divs inside divs, and other elements, they never seem to center when some things do... e_e (Maybe I should start a thread about that sometime, too.)
Title: Re: Why not another news box question!
Post by: Sheera on August 22, 2008, 06:29:17 PM
Quote from: schwarzkreuz on August 14, 2008, 02:40:21 AM
Got it working, now I'm just having trouble centering it.

Just how exactly did you center it? I tried it with <p align="center"> but that didn't work for the banner. Odd enough, it only NOT works on the banner.
Title: Re: Why not another news box question!
Post by: fesworks on August 22, 2008, 11:53:49 PM
EDIT: Oh crap... you are right! It DOESN'T work!

Mine is within tables, so the table/cell is aligning it.. not < p align> nor < center>

Is there a javascript aligning code? Maybe that would work.
Title: Re: Why not another news box question!
Post by: Xepher on August 23, 2008, 06:26:46 AM
The newsbox is formatted entirely using CSS, which can often override/break older formatting (like the <center> tag.) If I didn't use CSS however, then it wouldn't look right for anyone who IS using CSS to setup their page. Web standards are very annoying right now. If anyone has a better solution, I'm always happy to tweak the newsbox code.
Title: Re: Why not another news box question!
Post by: fesworks on August 23, 2008, 02:19:53 PM
I should really learn some CSS coding for my web pages... I kinda got shunned a couple episodes ago on The Webcomic Beacon for all the tables I use... also for not using "strong" tags instead of the "b" bold tags... I also use Frontpage Express....



Partly off-topic,... actually, I'll start a new thread elsewhere.
Title: Re: Why not another news box question!
Post by: Sheera on August 23, 2008, 02:52:18 PM
I've done it with a table now. Works fine. Thanks, fes. ^^
Title: Re: Why not another news box question!
Post by: griever on August 31, 2008, 11:51:51 AM
See Xepher's example! http://xepher.net/forum/index.php?topic=734.msg7681#msg7681
Title: Re: Why not another news box question!
Post by: Xepher on September 01, 2008, 02:24:06 AM
Yeah, nested CSS positioning is one of the most annoying things about CSS currently. CSS3 is supposed to fix a lot of that, but nothing really supports it yet. Thanks for the working example though Griever.
Title: Re: Why not another news box question!
Post by: Miluette on September 13, 2008, 10:18:33 AM
Hmm...
Everything on my main hub page is centered except the Xepher newsbox. See here: http://www.senshuu.com I guess I'll try the above!

I have trouble centering things however, and stuff like forms and dropdown lists (and divs with percentage widths rather than a hard number) will randomly not be centered when everything else is. If I can overcome this problem finally then I'll be just... so happy!

Also, since I don't want to start a new thread for this: Xepher, can you make a petite newsbox? One button-sized, or maybe long (horizontally) and thin? <3 I just love smaller button versions of things... When using banners, I usually go for the smaller ones.
Title: Re: Why not another news box question!
Post by: Xepher on September 13, 2008, 03:21:01 PM
If you can't get the centering to work, let me know and I can try and work on it with you. Definitely try the suggestion above though.

As for the "button-sized" newsbox. I'm afraid not. The whole purpose is to be an ad for other sites here, and tiny buttons don't really provide any space for them to plug their site. You don't HAVE to put it on the splash/first page though. My requirement is just a general "most people will see it" thing. So you could put whatever fits best on your three subsites, and bury them a little deeper down the page or what there if you want.
Title: Re: Why not another news box question!
Post by: fesworks on September 13, 2008, 04:22:49 PM
You can always put it in a table or a table's cell where the contents is centered. I know that works.

A table on such a small page should not have to worry about loading too much. Though I know too many tables with a lot of info can cause slow loading.
Title: Re: Why not another news box question!
Post by: Miluette on September 13, 2008, 05:20:52 PM
Quote from: fesworks on September 13, 2008, 04:22:49 PM
You can always put it in a table or a table's cell where the contents is centered. I know that works.


It's already like that.

Yes, I'll try that other method soon... as soon as I figure out where I can relocate the box to.
Title: Re: Why not another news box question!
Post by: fesworks on September 13, 2008, 06:05:16 PM
Quote from: Senshuu on September 13, 2008, 05:20:52 PM
Quote from: fesworks on September 13, 2008, 04:22:49 PM
You can always put it in a table or a table's cell where the contents is centered. I know that works.


It's already like that.

Yes, I'll try that other method soon... as soon as I figure out where I can relocate the box to.

You don't have the contents centered (different from text paragraph being centered)... within the "td" tag you should have align="center"
Title: Re: Why not another news box question!
Post by: griever on September 14, 2008, 04:14:32 AM
If I remember correctly, Fes' suggestion is different from what you have, actually.  Putting the align=right in the actual HTML tag vs. the text-align: right in the CSS is different.  I'd try that and see if it works.

If it doesn't, you can still have the nested div right under the table without having spacing/positioning problems.  Just pop it under and play with the CSS.  If you need any help, you have my LJ. :P
Title: Re: Why not another news box question!
Post by: Miluette on September 14, 2008, 02:07:02 PM
fesworks: oh... oh! I forgot about that.

LOL. Story time: A long time ago, before I fully understood the WC3 validator, I got a ton of errors on my websites and went about fixing them the wrong way. Of course, it told me things like the "img" tag couldn't have "alt" and other such weird things just because I screwed up something that badly. It told me a lot of things like that for tables, and hence I stopped putting "center" on things to avoid hassle. I know more now, a lot more, but it's still habitual of me to forget that I can, in fact, assign center to td and soforth.

While I'd rather not tag up my tables (which is why I'm learning div/float/argghh), I don't really have a choice and it's pretty simple anyway.

I'm gonna mess around...later! Right now is break time <3

EDIT: Ah I went ahead and tried. And no, that didn't work. I had a feeling it wouldn't, because I've tried that with certain things before and had it not work. Oh trauma. XD Now for the other method.

EDIT TWO: Okay, so I put in griever's code and now it...stays at the right! Which is also not centered.
Title: Re: Why not another news box question!
Post by: griever on September 14, 2008, 03:01:37 PM
Try moving the nested DIVs completely outside of the TABLE structure?
Title: Re: Why not another news box question!
Post by: Miluette on September 15, 2008, 02:46:18 AM
It still does the same thing.
Title: Re: Why not another news box question!
Post by: griever on September 15, 2008, 05:58:43 AM
Oh, duh.  >.<  Take out the float:right and that might fix it.
Title: Re: Why not another news box question!
Post by: Xepher on September 15, 2008, 01:34:26 PM
I'm working on this one right now...
Title: Re: Why not another news box question!
Post by: Xepher on September 15, 2008, 01:47:01 PM
Okay, got it... I directly edited the file again. The old css has been saved as "oldhub.css" just in case. Reduced the index.php file to only have one "id=xepher" div around the newsbox script. The CSS file now only has:
#xepher {
        margin: auto;
        width: 500px;
        padding: 0;
}

to center the box.

The key is that if you use the "margin: auto;" thing to center stuff, you must specify a width. I set the width to exactly the size of the newsbox, because it centers better that way. IE (at least 6.x) renders stuff weird, so "padding:0" hopefully keeps IE from cropping the edges of the box. If it's still cropping, set the width a tad larger, to 505px or something, until it looks okay again. If it doesn't center at all in IE, you may need to set "text-align: center;" for the body tag. I REALLY hate having to do all these stupid hacks to make IE work correctly. I haven't tested with IE7 much though, so maybe it's better now.

Title: Re: Why not another news box question!
Post by: Databits on September 15, 2008, 05:54:20 PM
Some browsers will cascade the margin: auto as well as the text-align thing down into the news box. This is actually a good thing because that's how it's supposed to work. The problem being that there's a lot of browsers that do not implement that properly, and therefore a lot of people aren't used to that. Generally it's a good idea to set the alignment within every element that is displaying text, image, or some object content. That's the only way to make sure that it'll display it properly across all the different browsers.

IE also has an overflow bug, where if you have something set with a width, and set something inside of it with a width: 100%, the internal element "overflows" the container by around 15-20 pixels for no good reason. This is an IE specific bug because the box model they use is retarded. I am unsure what the fix for that was at this time though.
Title: Re: Why not another news box question!
Post by: Xepher on September 15, 2008, 06:36:15 PM
The padding: 0 is supposed to fix some of that IE overflow. IE computes a box size AFTER all margins and borders have been added, whereas the standard says borders/margins aren't included... or something like that. Bottom line is, IE sucks, so if you want it to look right there, test it there and keep tweaking. :-)
Title: Re: Why not another news box question!
Post by: griever on September 16, 2008, 06:46:14 AM
Ahh, that completely makes sense now.  Minus the IE weirdness.  Thanks for the corrected version, Xepher!  I was also able to eliminate the #xepher2 DIV as well.  And cleaner code is always better. ^-^
Title: Re: Why not another news box question!
Post by: Databits on September 16, 2008, 06:15:51 PM
Ahh right, that's how I'd fix it. Even in tables, rather than using padding I'd use divs with margins to properly space things out. Thank you IE for making web development life a pain in the ass.  :-\
Title: Re: Why not another news box question!
Post by: Miluette on September 16, 2008, 10:41:18 PM
Yay! I love stuff that works. I just hope what you're doing sinks in. I seriously forget all these little things that make stuff look right in ALL browsers.

On another note... IE7 has not been loading pages for me, and I have NO freaking clue how to get in and modify any of its settings because it doesn't have that bar at the top. IE7 just makes me rage, so I try not to think about it anymore.

The other day I checked to see what kind of browsers people who come to my websites have. I got several IE5 hits. I know for a fact that my websites will NOT look good in IE5. @_@
Title: Re: Why not another news box question!
Post by: Databits on September 17, 2008, 12:33:16 AM
If people are still using IE5, screw em. Most the web development community doesn't even support it anymore. IE6 or higher, either upgrade or stop using the internet.