www.webdeveloper.com
Results 1 to 7 of 7

Thread: newbie need some little help in basic expression

  1. #1
    Join Date
    Jul 2009
    Posts
    4

    newbie need some little help in basic expression

    Hello to all members! this is my first post and just a a little question
    is it possible to have an expression that when the browser resize
    the css padding or margin will adjust automatically? like a parent child?

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Could be possible. Just detail your needs, please.

  3. #3
    Join Date
    Jul 2009
    Posts
    4
    Thanks Kor, i wish that when window resize the % position placement will increase value like a parent child (linking) heres the screenshot http://img25.imageshack.us/i/expressionmove.jpg/
    from default 0% and when the window resize to small will increase the percentage.

  4. #4
    Join Date
    Jul 2009
    Posts
    62
    you could easyly do this with only css by setting the options of min-width, max-width, max-height and min-height.... here what it would look like:

    Code:
    <html>
    <head>
    
    </head>
    <style>
    div {
    	max-width:900px;
    	min-width:700;
    	height:500px;
    	background:#00F;
    	border:5px solid #000;
    	margin-left:auto;
    	margin-right:auto;
    }
    </style>
    <body>
    
    <div> </div>
       
    
    </body>
    </html>
    Here is a link to the live view...http://thechozenfew.net/test4.htm

    hope this is what you wanted to acomplished

  5. #5
    Join Date
    Jul 2009
    Posts
    62
    Quote Originally Posted by chandro View Post
    Thanks Kor, i wish that when window resize the % position placement will increase value like a parent child (linking) heres the screenshot http://img25.imageshack.us/i/expressionmove.jpg/
    from default 0% and when the window resize to small will increase the percentage.
    sadly im not familiar with the wizards on Dreamweaver, i prefer to code everything myself, i find it more flexible. Dreamweaver is a great program to code, it helps you alot... i personally encourage you to code you pages, you will understand it better, Dreamweaver generates lot of redundancy codes.

  6. #6
    Join Date
    Jul 2009
    Posts
    4
    Thanks ptejada, thats nice one and really useful! but what doc type that work for this? seem this doc type wont work with max min <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    regarding my question i need a script somehow detects window and the idea is to make it work linking to to padding (&#37;left) or position placement.
    when the window reduce size the value of padding or the position placement left will increase and window enlarge the value decrease
    (just the padding will work)
    i found a link that somehow had the idea but im not a programmer to put everything right
    http://www.howtocreate.co.uk/tutoria.../browserwindow
    Last edited by chandro; 07-12-2009 at 07:59 PM.

  7. #7
    Join Date
    Jul 2009
    Posts
    4
    just to add, im more concern on the window height if this matter,
    i was thinking changing stlesheet for every screen resolution but this takes so much time when i have to update.
    is this expression with modification work?
    http://reference.sitepoint.com/css/expression
    http://webfx.eae.net/dhtml/cssexpr/cssexpr.html
    Last edited by chandro; 07-12-2009 at 09:53 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles