Click to See Complete Forum and Search --> : Layout with Bravenet Content


tims15
03-26-2005, 10:58 AM
I want to have the bravenet headlines thing and the today in history thing on my web page side by side. How do I do this, as I have tried all I can think off? The codes are below.

<!-- Start Bravenet.com Service Code -->
<!-- The following line of code must be on one line, it cannot wrap // -->
<div align="center"><script language="JavaScript" src="http://pub15.bravenet.com/news/headlines.php?usernum=1287988386&cpv=2">
</script></div>
<!-- End Bravenet.com Service Code -->

<!-- Start Bravenet.com Service Code -->
<!-- The following line of code must be on one line, it cannot wrap // -->
<div align="center"><script language="JavaScript" src="http://pub15.bravenet.com/history/remote.php?usernum=1287988386&cpv=2">
</script></div>
<!-- End Bravenet.com Service Code -->

js_prof_cons
03-26-2005, 11:05 AM
Find the first <div> tag. Despite the align="center" being nonstandard, I wil ignore it. Add to this div:<div ... style="float:left;">The code would look like:<div style="float:left;"><script language="JavaScript" src="http://pub15.bravenet.com/news/headlines.php?usernum=1287988386&cpv=2"></script></div>
<div style="float:left;"><script language="JavaScript" src="http://pub15.bravenet.com/history/remote.php?usernum=1287988386&cpv=2"></script></div>That should do the trick. To center them, you might need another <div>, but I won't get into that until you reply.

phpnovice
03-26-2005, 11:10 AM
Have you actually tried that? My understanding is that once you add the float:left;, the text-align:center; in the parent container is ignored.

js_prof_cons
03-26-2005, 11:18 AM
Have you actually tried that? My understanding is that once you add the float:left;, the text-align:center; in the parent container is ignored.That was actually the reason I didn't post that, as the problem ensued. As I was working on that, I had no time to edit my post. However, the response you have posted seems to be the solution I too arrived at. Actually, I just realized I have edited my post. Your quote comes from the post before it was tested. 'Twoud be appreciated if you'd care to remove the quote, but leave the point, as it served a purpose.

phpnovice
03-26-2005, 02:41 PM
'Twoud be appreciated if you'd care to remove the quote, but leave the point, as it served a purpose.
Done. ;)

tims15
03-27-2005, 04:17 PM
I tried using it, but all I got was the first item show and an error message?!

js_prof_cons
03-27-2005, 04:32 PM
I used the exact code in my first reply here. There existed no error, except the display was left aligned, not centered. If there was an error message, it is from the JavaScript linked to, not my code.

tims15
03-27-2005, 04:41 PM
I tried it again but it still didn't work, saying something about a syntax error. Then when I tried it again, without changing anything for some reason it worked!

Would you be able to tell me how to get it centered?

js_prof_cons
03-27-2005, 04:48 PM
My understanding is that once you add the float:left;, the text-align:center; in the parent container is ignored.I've found the reliable phpnovice to be correct once again. You might be able to render a way, but that would be for a CSS expert, not me.

phpnovice
03-27-2005, 10:51 PM
...that would be for a CSS expert, not me.
I second that emotion. Until then, this table arrangement will do it:

http://www.webdeveloper.com/forum/showthread.php?t=60388

js_prof_cons
03-27-2005, 10:58 PM
I second that emotion. Until then, this table arrangement will do it:

http://www.webdeveloper.com/forum/showthread.php?t=60388Of course you second it, I quoted you! Just kidding around. Obviously you'd have the reference to that thread, and hopefully it serves well to the original poster.