Click to See Complete Forum and Search --> : Trying to center comment buttons in Internet Explorer
mike444
08-15-2006, 07:08 PM
hi,
I finally have my comments page working but the "Post" and "Refresh" buttons are not centering in Internet Explorer. In Mozilla they are fine. I tried specifying the position using "margin:" in the external css file using an IE hack but I'm not sure where the buttons are in the shoutbox.php page code.
does anyone know of a way i can get the "Post" and "Refresh" buttons under the text box as it is in mozilla?
:confused: click here to see page (http://tinyurl.com/qwavx)
thank you
ray326
08-15-2006, 09:23 PM
Without a doctype IE will never match up with web browsers.
mike444
08-16-2006, 02:46 PM
so you're saying I should take the doc type from my regular website pages and put in my comment page code?
mike444
08-16-2006, 03:17 PM
Okay, I specified a doc type for my shoutbox page but the problem is most of the code for the page is so unintelligible (im new to Mysql), when I try to use an IE hack, I don't know where to put the identifier because I don't know where the buttons (that's what I'm trying to position) begin or end in the code.
The doc type is obviously a start but I'm afraid I will need a little more help in positioning the buttons. Can anyone advise me further on this? Thank you.
Mike
ray326
08-16-2006, 10:42 PM
Well, the doctype needs to be the first line. It's the second. And there's a lot of nonsense in there like float:center and that first visible line should be an h1, not a div and none of the breaks are needed.
The bottom line is start here.
http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.thedailysearch.com%2Fshoutout%2Fshoutbox.php
WebJoel
08-17-2006, 09:32 AM
I put lil' wedges and tweaks throughout this, imported your external CSS and comment-out the external, got it centered and everything more-or-less lines up.
There are repeated deprecated tags that I started to removed, but it was causing problems so I re-installed what you had. There are quite a few "id" 's being used over, when they should be "class" 'es. I re-did those, and got unpleasing results, so I put them back...
I put in a strict !doctype first of all (hence, causing these errors), but it works like I said, more-or-less 'centered' on IE and Firefox, -so we've gained some ground.
I might tweak it more, later...
JavaKid93
08-17-2006, 09:42 AM
right after the text-box code put <br> and maybe it will move under the text-box.
and if your wanting it centered, u could use <div align="center, or left, or right">
then
</div>
WebJoel
08-17-2006, 11:21 AM
right after the text-box code put <br> and maybe it will move under the text-box.
and if your wanting it centered, u could use <div align="center, or left, or right">
then
</div>
You know, -that might actually work. Right now I merely have the button-containing element with a postion:relative; left:somethingpx; because I assume that this width will never change. This should be centered, not positioned., to keep it 'fluid'..
What I did will display differently in IE vs. Firefox, as Firefox isn't showing a vertical scrollbar unless one is needed. IE just shows it. I'm 'centering' based upon the presence of a vert. scrollbar, so there's about a 20-pixel discrepancy between the two when 'visually' inspected.
I should have posted the main problem I fixed (so that we all could understand this), -I forgot what I did, but it seems as if there was a "float:left;" in the CSS somewhere that was a major tripping factor. I commented it out and things started behaving better... Might be that this is why the buttons were 'to the left' and removing that freed-up the element and alowed me to 'position' it nicely even though it seemed stubborn and would not 'center' for me any other way..