TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 02-27-2010, 04:45 PM   #1 (permalink)
The Visitor
 
Join Date: Feb 2010
Posts: 4
Thanks: 1
godfather20071 is on a distinguished road
Default Question | About Resolution

hello people , i asked alot of people about how can i match my
website to any Resolution. but got no help yet.

here is my index.htm code:
Code:
<html>
<head>
    <title>noname</title>
    <link rel="stylesheet" type="text/css" href="Style.css" /> 
</head>

<body>


    <div class="rounded-box">
        
        <div class="bottom-left-corner">
            <div class="bottom-left-inside">&bull;</div>
        </div>
    
        
        <div class="bottom-right-corner">
            <div class="bottom-right-inside">&bull;</div>
        </div>
        
        <div class="box-contents">
            
        </div> <!-- end div.box-contents --> 
        
    </div> <!-- end div.rounded-box -->





     <div class="rounded-box1">
    
        <div class="top-left-corner">
            <div class="top-left-inside">&bull;</div>
        </div>
        
        <div class="bottom-left-corner">
            <div class="bottom-left-inside">&bull;</div>
        </div>
        
        <div class="top-right-corner">
            <div class="top-right-inside">&bull;</div>
        </div>
        
        <div class="bottom-right-corner">
            <div class="bottom-right-inside">&bull;</div>
        </div>
        
        <div class="box-contents">
            <a href="index.htm">Home</a>
 <br>        <a href="ptc.htm">Paid To Click </a>
 <br>        <a href="ptr.htm">Paid To Read </a>
 <br>        <a href="pts.htm">Paid To Search </a>

        </div> <!-- end div.box-contents --> 
        
    </div> <!-- end div.rounded-box -->



     <div class="rounded-box2">
    
        <div class="top-left-corner">
            <div class="top-left-inside">&bull;</div>
        </div>
        
        <div class="bottom-left-corner">
            <div class="bottom-left-inside">&bull;</div>
        </div>
        
        <div class="top-right-corner">
            <div class="top-right-inside">&bull;</div>
        </div>
        
        <div class="bottom-right-corner">
            <div class="bottom-right-inside">&bull;</div>
        </div>
        
        <div class="box-contents">
            hbhnn
        </div> <!-- end div.box-contents --> 
        
    </div> <!-- end div.rounded-box -->


     <div class="rounded-box3">
    
        <div class="top-left-corner">
            <div class="top-left-inside_3">&bull;</div>
        </div>
        
        <div class="bottom-left-corner">
            <div class="bottom-left-inside_3">&bull;</div>
        </div>
        
        <div class="top-right-corner">
            <div class="top-right-inside_3">&bull;</div>
        </div>
        
        <div class="bottom-right-corner">
            <div class="bottom-right-inside_3">&bull;</div>
        </div>
        
        <div class="box-contents">
          bla bla 
          and i will help u to make money online <hr>
        </div> <!-- end div.box-contents --> 
        
    </div> <!-- end div.rounded-box -->

    <div class="rounded-box4">
    
        <div class="top-left-corner">
            <div class="top-left-inside">&bull;</div>
        </div>
        
        <div class="bottom-left-corner">
            <div class="bottom-left-inside">&bull;</div>
        </div>
        
        <div class="top-right-corner">
            <div class="top-right-inside">&bull;</div>
        </div>
        
        <div class="bottom-right-corner">
            <div class="bottom-right-inside">&bull;</div>
        </div>
        
        <div class="box-contents">
            hbhnn
        </div> <!-- end div.box-contents --> 
        
    </div> <!-- end div.rounded-box -->


<br>

<table class=noname width=206 height=84 border=0 cellspacing=0 cellpadding=0>
 <tr><td></td></tR></table>

</body>
</html>

and here is my css file:
Code:
/**-------------------------------------
    GLOBAL ATTRIBUTES
--------------------------------------**/


    body {
        margin: 0px 0px 0px 0px;
        background-color:#c6edfd;
    }
    
    /*הגדרה כללית של הצבע שמתחת לפינות*/
    /*#c6edfd הצבע המקורי */
    div.top-left-corner, 
    div.bottom-left-corner, 
    div.top-right-corner, 
    div.bottom-right-corner
    {
        position:absolute; 
        width:20px; 
        height:20px; 
        background-color:#c6edfd; 
        overflow:hidden;
    }
    
    /*הגדרה כללית של כל הפינות המעוגלות והצבע שלהן*/
    div.top-left-inside, 
    div.bottom-left-inside, 
    div.top-right-inside, 
    div.bottom-right-inside 
    {
        position:relative; 
        font-size:150px; 
        font-family:arial; 
        color:#65c9fe; 
        line-height: 40px;
    }
    
    
    /*הגדרת צבע פינות רק ל box 3*/
    /*הגדרתי את הצבע לירוק שתבחין בהבדל*/
    div.top-left-inside_3, 
    div.bottom-left-inside_3, 
    div.top-right-inside_3, 
    div.bottom-right-inside_3 
    {
        position:relative; 
        font-size:150px; 
        font-family:arial; 
        color:#ffffff; 
        line-height: 40px;
    }


/**-------------------------------------
    main_box
--------------------------------------**/

    div.rounded-box {
        position:relative;
        width: 700px;height:100px;
        background-color: #65c9fe;
        margin: 0px 0px 0px 152px;
    }
    
    /*הגדרה של צבע main ב box מסויים*/   
    div.rounded-box1 {
        position:relative;
        width: 150px;height:200px;
        background-color: #65c9fe;
        margin: 25px 0px 0px 170px;
    }    

    /*הגדרה של צבע main ב box מסויים*/  
    div.rounded-box2 {
        position:relative;
        width: 150px;height:200px;
        background-color: #65c9fe;
        margin: 25px 0px 0px 170px;
    }  


    /*הגדרה של צבע main ב box מסויים*/  
    div.rounded-box3 {
        position:relative;
        width: 480px;height:800px;
        background-color: #ffffff;
        margin: -410px 0px 0px 350px;
    }      


    /*הגדרה של צבע main ב box מסויים*/  
    div.rounded-box4 {
        position:relative;
        width: 700px;height:60px;
        background-color: #65c9fe;
        margin: 25px 0px 0px 152px;
    }      

/**-------------------------------------
    center
--------------------------------------**/   
    
    div.top-left-corner { 
        top:0px; 
        left:0px; 
    }
    
    
    div.bottom-left-corner {
        bottom:0px;
        left:0px;
    }
    
    div.top-right-corner {
        top:0px; 
        right:0px;
    }
    
    div.bottom-right-corner {
        bottom: 0px; 
        right:0px;
    }

/**-------------------------------------
    inside
--------------------------------------**/  

    
    div.top-left-inside {
        left:-8px;
    }
    
    div.bottom-left-inside {
        left:-8px;
        top:-17px;
    }
    
    div.top-right-inside {
        left:-25px;
    }
    
    div.bottom-right-inside {
        left:-25px; 
        top:-17px;
    }
    
    
    div.top-left-inside_3 {
        left:-8px;
    }
    
    div.bottom-left-inside_3 {
        left:-8px;
        top:-17px;
    }
    
    div.top-right-inside_3 {
        left:-25px;
    }
    
    div.bottom-right-inside_3 {
        left:-25px; 
        top:-17px;
    }

/**-------------------------------------
    contents
--------------------------------------**/ 
    
    div.box-contents {
        position: relative; 
        padding: 8px; color:#000;
    } 



table.big {position:relative;
        width: 900px;height:800px;
       
        margin: -1200px 0px 0px 50px;}

table.youmoney {position:relative;
        margin: -1030px 0px 0px 175px;
background-image: url(pix/noname.jpg)}



A:link {text-decoration: none; color: #2b0ce8}
A:visited {text-decoration: none; color: #2b0ce8}
A:active {text-decoration: none; color: #2b0ce8}
A:hover {text-decoration: none; color: #2b0ce8;}
in the css file there is some notes in hebrew language
ignore that..

so again
my question is:
what should i do to match my website to any resolution


thx alot!!
godfather20071 is offline  
Reply With Quote
Old 02-27-2010, 04:50 PM   #2 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

I don't understand what you mean by "match" your site to any resolution. As long as it displays good on a 1024x768 you are good.
__________________

Village Idiot is offline  
Reply With Quote
Old 02-27-2010, 06:11 PM   #3 (permalink)
The Visitor
 
Join Date: Feb 2010
Posts: 4
Thanks: 1
godfather20071 is on a distinguished road
Default

Quote:
Originally Posted by Village Idiot View Post
I don't understand what you mean by "match" your site to any resolution. As long as it displays good on a 1024x768 you are good.
yes the website displays good on a 1024

but i tried in another pc with big screen and another resolution
it's not displaying good..

any help plz... :(
godfather20071 is offline  
Reply With Quote
Old 02-27-2010, 08:02 PM   #4 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

width: 100%

Displays 100% at any resolution.
delayedinsanity is offline  
Reply With Quote
Old 02-27-2010, 08:21 PM   #5 (permalink)
The Addict
 
tony's Avatar
 
Join Date: Aug 2008
Posts: 336
Thanks: 8
tony is on a distinguished road
Default

do you want to make your website fixed to 1 resolution or to extend depending one the clients resolution? If you want a fixed resolution like 1024x768 that is easy by using pixels in your widths, but with a expandable resolution you would need to setup a base font size for the body and then use either em units or percentages for the widths of your columns.
tony is offline  
Reply With Quote
Old 02-28-2010, 11:47 AM   #6 (permalink)
The Visitor
 
Join Date: Feb 2010
Posts: 4
Thanks: 1
godfather20071 is on a distinguished road
Default

what i want is to setup my website to display good in any
resolution.

how could i do that ?

thank u 4 helping me and sorry because my english not so good.
godfather20071 is offline  
Reply With Quote
Old 02-28-2010, 12:49 PM   #7 (permalink)
The Wanderer
Newcomer 
 
Parvus's Avatar
 
Join Date: Aug 2008
Posts: 21
Thanks: 1
Parvus is on a distinguished road
Default

If your width is fixed (always stays the same) than you could center everything and use a normal background color.
If you want your width to adept(change on resolution) than you should use width % like 100% or whatever.

PS: I see your using position:absolute on your bottom right corner ... which i guess makes it look weird.
Parvus is offline  
Reply With Quote
The Following User Says Thank You to Parvus For This Useful Post:
godfather20071 (02-28-2010)
Old 02-28-2010, 01:13 PM   #8 (permalink)
The Visitor
 
Join Date: Feb 2010
Posts: 4
Thanks: 1
godfather20071 is on a distinguished road
Default

thank u i will try to do something
godfather20071 is offline  
Reply With Quote
Old 02-28-2010, 03:59 PM   #9 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

Quote:
PS: I see your using position:absolute on your bottom right corner ... which i guess makes it look weird.
That's because he's using css rounded corners to create the look of his site. They're absolute positioned inside of the rounded-box div and won't have an effect on where the actual content is being positioned.

css Code:
div.rounded-box {
        position:relative;
        width: 700px;height:100px;
        background-color: #65c9fe;
        margin: 0px 0px 0px 152px;
    }

This is where the problem may lie. You're positioning the main div 152 pixels from the left border, and while that may center it on certain displays, the larger the resolution, the more whitespace you're going to wind up with on the right side. Give this a try:

css Code:
div.rounded-box {
        position:relative;
        width: 700px;height:100px;
        background-color: #65c9fe;
        margin: 0 auto;
    }

On a side note, you don't have to specify the method of measurement, such as px or em, on 0 widths. Also, since you have a good handle on CSS so far, you might want to look into shorthand properties (http://www.w3schools.com/css/pr_margin.asp for example) so that you don't find yourself creating larger stylesheets than necessary.
delayedinsanity is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Answer Then PHP Question codefreek The Lounge 14 07-20-2009 07:19 PM
question about ftp kritikal General 3 04-28-2008 03:21 PM
$_SERVER['REQUEST_URI'] question solistus General 4 04-01-2008 09:31 PM
Cleaning data before entering database question Killswitch General 7 12-24-2007 11:29 PM
Important Database Structure Question! AnthonyOS MySQL & Databases 5 12-20-2007 03:26 PM


All times are GMT. The time now is 06:59 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design