Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old February 15th, 2008, 10:24 AM
Dysan Dysan is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Nov 2007
Posts: 286 Dysan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 Days 4 h 17 m 49 sec
Warnings Level: 3
Number of bans: 1
Reputation Power: 1
Resize Container Div

Hi,

Upon resizing the browsers text size, in order to display larger text on the page, is it possible to also resize the containing div?

I have the following page, that displays the status of a shopping cart, upon resizing the browsers text, is it possible to also resize the width and height of the cartStatusOrange & cartStatusGreen div?

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>

<body>
<div id="container">
  <div id="cartStatusOrange">
    <div id="cartStatusGreen">
      <div id="cornerLeft"></div>
      <div id="cornerRight"></div>
      <div id="cartStatusBold">Shopping Cart: <span id="cartStatus">(0 items)</span></div>	
	</div>
  </div>
</div>
</body>
</html>


Code:
*
{
  FONT-SIZE: 8pt;
  FONT-FAMILY: Tahoma;  
}

body
{
  MARGIN: 0px;
  PADDING: 0px;
  BACKGROUND: url(bg.bmp) no-repeat;
}

#container
{
  LEFT: 20px;
  WIDTH: 730px;
  HEIGHT: 453px;
  POSITION: absolute;
/*  BORDER: 1px solid rgb(0,0,0);*/
}

#cartStatusOrange
{
  WIDTH: 211px;
  HEIGHT: 39px;
/*  BACKGROUND: rgb(255,217,83);*/
}

#cartStatusGreen
{
  WIDTH: 211px;
  HEIGHT: 36px;
/*  BACKGROUND: rgb(187,210,1);*/
}

#cartStatusBold
{
  TOP: 13px;
  LEFT: 63px;
  POSITION: relative;
  COLOR: rgb(0,0,0);
  FONT-WEIGHT: bold;
}

#cartStatus
{
  FONT-WEIGHT: normal;
}

#cornerLeft
{
  TOP: 14px;
  WIDTH: 9px;
  HEIGHT: 12px;
  POSITION: relative;
  BACKGROUND: url(cornerLeft.bmp) no-repeat;
  FLOAT: left;
}

#cornerRight
{
  TOP: 14px;
  WIDTH: 9px;
  HEIGHT: 12px;
  POSITION: relative;
  BACKGROUND: url(cornerRight.bmp) no-repeat;
  FLOAT: right;
}

Reply With Quote
  #2  
Old March 30th, 2008, 03:55 PM
student101 student101 is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Nov 2007
Posts: 119 student101 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 2 m 20 sec
Reputation Power: 1
I am no CSS fundi, but why resize when you have set the size?
Maybe try 100% or google.

Cheers
__________________
[DWMX 2004]|[DWMX 8]|[DW CS3]|[MySQL]|[SQL]|[Access ]|[ASP/VBScript]|[PHP]|[XP-Pro]
Global fix: "Invalid Default Script Language"
Amateurs ... Built the ark.
Professionals ... Built the Titanic.

Reply With Quote
  #3  
Old April 1st, 2008, 03:42 AM
JohnFrank JohnFrank is offline
Contributing User
Click here for more information
 
Join Date: Feb 2008
Posts: 41 JohnFrank User rank is Just a Lowly Private (1 - 20 Reputation Level)  Folding Points: 4836212 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4836212 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4836212 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4836212 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4836212 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4836212 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4836212 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4836212 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4836212 Folding Title: Super Ultimate Folder - Level 10Folding Points: 4836212 Folding Title: Super Ultimate Folder - Level 10
Time spent in forums: 8 h 9 m 2 sec
Reputation Power: 1
Quote:
Originally Posted by student101
I am no CSS fundi, but why resize when you have set the size?
Maybe try 100% or google.

Cheers
Yes, you have used absolute widths for each div.

You could try and set the outermost div absolute if that is what you want and set the inner container div's using percentages they will take up each.

If you want the outermost div to take up the available space then do not set a width (it will assume 100%).

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Resize Container Div


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT