![]() |
Common issue?
Hey guys,
I've been trying to get my bearings since I kinda dropped CSS for PHP. I want to make a 400x100 div layer in a document and centering it both horizontally and vertically. Yet I have NO idea how to manage this. Anyone crazy enough to take a guess? :-P Thanks. |
by using css, php wont position things for you, unless you tell it to output html with some css, but then you are mixing presentation logic and php logic.
this may be of some use: Joe2Torials.com * ‡ * css - Horizontal And Vertical Centering |
I know that you can't position anything with PHP. :-) It's a scriptlanguage not meant for markup.
Thanks. ;-) |
hehe :-D just thought i'd make sure.
hope that article helps |
Sure did sketch, thanks aloot. ;-)
|
Just put
<style></style> tag's before <?php ;-D and add the CSS you want :P and then you can wrap a Div around the '<?php ?>' and it should do the trick. Like almost everyone else said, you cannot do it in php thus do it outside the tags. |
Making<style> tags on every page makes the page load time only longer... Simply create a <link> with the stylesheet type. :-) And of course you can simply use <span style="font-weight: bold;"> but that aside.
|
Quote:
|
| All times are GMT. The time now is 03:44 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0