Re: css

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/9/06, JeRRy <jusa_98@xxxxxxxxx> wrote:
>
> Hi everyone,
>
>   I have created this website in PHP and mySQL at
> http://www.bps-testntag.com/ but have come accross an error I was not
> aware of before.
>
>   Now I am using stylesheets and I have been surfing the net for about 90
> minutes and yet to find a solution, so thought I'd post here, could be basic
> but i can't find it online anywhere.  Get alot of forum refrences but no
> solution.
>
>   Here is the code below before I continue:
>
>   <style type="text/css">
>   html {
> background : url(images/background3.jpg);
> }
> body {
> margin : 0;
> padding : 0 1px;
> border : 0;
> height : 100px;
> background : url(images/background3.jpg);


.......

  Now I have been told NOT to use "px" but use "%" for meassurements because
> this is relient on resolution/screen_size.
>
>   HOWEVER what does 1px equal in %?
>
>   Some have said 30px equals 3% and some say 30px equals 30%.  30px and
> 30% don't seem right, I changed my CSS for this and it pushes everything
> only slightly to the RIGHT.  But removes the menu altogether.
>
>   Can anyone offer some help here?
>
>   Also if a table is made like this:
>
>   <table width=300 height=400>  Is that default % or px or what?  What is
> the best method to use that will work in people using screens of 600* and
> 1024* and both be able to view the site cleanly and easily?
>
>   I will continue to surf.
>
>   J


Hi J,

If there was an exact "equal" to pixels and %, then  it really wouldn't
matter which you used.  The percentage is percentage of  a  table, screen
size, etc.  If you say

<table width="50%">

You are saying to make the table 50% of the screen width.  Different people
have different # of pixels in their width.  This is where the difference
comes in.  [Here is where people tell you not to use tables to lay out
stuff, put it in the CSS].

The default numbers are pixels (I don't know if this behavior can be
changed).

cheers,
--
http://kimbriggs.com

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux