it just doesn't make sense!!!!!!

Status
Not open for further replies.
Jul 30, 2006
377
4
0
Houston, TX
www.boxgraphic.com
I'm working on this website for Unicare Dental and I have a weird problem.
all of the pages on the site are W3C valid. both HTMLs and CSS. but I'm getting different view on Internet Explorer and FireFox. I set the layout to align center. it works in IE but not in FF. the codes are valid so what am I doing wrong here? have a look for yourself. Dental Office
thank you in advance for your help :xomunch:
 


okay do this

all the content you want to center you need to add 2 things
put <div align="center"> before it
then <div style="position: relative"> after it
close it properly
test
come back with results :)
 
Fuck that!

thanks Stan. I did try what you said, but it says "In XHTML 1.0 Strict the attribute 'align' is not permitted for the <div> tag."

So? Fuck that! Try it. If it works, use it. All those million browser issues are intertwined, entangled and in short, a piece of SHIT.

Just don't bother having it align to the pixel. If it works and looks ok, use it, move on.

Sorry for ranting, but I used to work at the HTML for a 1.5 million views per day site and we HAD to get everything working 100% across all browsers, all versions on all platforms. We eventually dropped NS4.x in 2002 ... yay!

Unless you get that number, please, for the sake of fucking, drop it! It is simply not worth it.

</rant>

::emp::
 
Priority #1: Making the site look okay to humans.

Priority #99339393: Making sure the site is compliant with a set of standards that nobody cares about and that does not make the site look okay to humans.
 
You could write the shittiest code ever, and it'd validate. You could also write code that displays exactly the same in all browsers, that doesn't validate.

If it displays the same in all browsers, use it. If it doesn't validate, it's not a problem really.
 
It's nice to see a forum that understands the W3C standards are ridiculous.
 
Try setting a width to the div that wraps all the content within the body tag; and also clear all preset margins and padding.
<style>
body {
margin: 0;
padding: 0;
text-align: center;
}

#wrapper {
width: 800px;
margin: 0 auto;
}
</style>

<body>
<div id="wrapper">
PAGE CONTENT
</div>
</body>

This will center your page in all browsers and should also pass standards, I dont really know the cause I never really bothered checking
 
margins format is margin:[top]
[bottom]

So
margin: 0 auto;
will set the top margin to 0, and the rest to auto, the results will be equal margins for left and right. Thus a centred div.
That's what is used to center these CSS days.

but you need to also set the width, since a div's width will automatically be 100%

So roozbeh007 you were on the right path..you have
On line 115 you have
<div style="margin-right:auto;margin-left:auto;text-align:center;"><div style="padding-right:25px;padding-left:25px;padding-bottom:0px;width:706px;padding-top:5px;text-align:center;">So your first div will be 100% which you don't want..so change it to

<div style="margin: 0 auto;text-align:center;width:706px"><div style="padding-right:25px;padding-left:25px;padding-bottom:0px;padding-top:5px;text-align:center;">

So when using margin-left:auto and margin-right:auto, make sure you also set the width:​
 
That snow is fucking distracting, man. Pisses me off, and makes me wanna break things. Like... Snow.
 
Status
Not open for further replies.