Why my text has the justify effect?
In my whole site, I make echos and i dont specify a “text-align:justify;”
but my text is still justifying. Justify is when you make the browser window smaller, the text moves so it fits in the window. I tryed making something like this:
<?php
echo "<h1>some stuff.</h1>";
?>
<html>
<head>
<style>
h1
{
text-align:center;
}
etc….
but it just makes the text go in the center and it keeps the justify effect.
please help me =[
thanks
That’s not what justify is. Justify makes it so all lines of text are the same width, like this:
(source: pws-ltd.com)
If you don’t want the text to stay inside the window when you shrink it (so if you want a horizontal scrollbar), you have to set a
min-widthon a<div>containing the text.Edit: though maybe I misunderstood what you were actually trying to do, and you just want it centered. If so, use
margin: 0 auto;nottext-align: center;