473,511 Members | 16,849 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to deal with different client resolution?

Hi, How do you guys deal with the different clinet resolution? For
example, you have
800*600, 1024*768 and 1280*1024 on client side.

We used to put everything into a table with fixed width (the lowest
width of your clients' resolutions) then put everything inside the
table with a percentage width. But for those clients with higher
resolution, this way put them into a very smaller area to work on. But
If we do not fix the outtest table's width for example, if we put
width=100% , some control for example text with multilines will shows
with a fixed width which is awkward. Can we make the width of textbox
change with the percentage?

I would like to know how you guys deal with this, are there any best
practice. what you guys are deal with this. Any experience can share
with?

Thanks
-rockdale

Sep 5 '06 #1
7 1905
rockdale napisał(a):
Hi, How do you guys deal with the different clinet resolution? For
example, you have
800*600, 1024*768 and 1280*1024 on client side.

We used to put everything into a table with fixed width
Forget the table-based layouts. Read about css, tableless layouts,
separating content from presentation etc. It will help you to get rid of
this kind of problems. And think about em instead of percent units.
--
PP
Sep 5 '06 #2
I aleways use table to position controls on my web page. I also use css
but more for define font size etc. I would like to know more about the
stuff that you talking about - tableless layouts , separating content
from presentation - any links you can suggest?

Thanks

Przemek Ptasznik wrote:
rockdale napisal(a):
Hi, How do you guys deal with the different clinet resolution? For
example, you have
800*600, 1024*768 and 1280*1024 on client side.

We used to put everything into a table with fixed width

Forget the table-based layouts. Read about css, tableless layouts,
separating content from presentation etc. It will help you to get rid of
this kind of problems. And think about em instead of percent units.
--
PP
Sep 5 '06 #3
rockdale napisał(a):
I aleways use table to position controls on my web page. I also use css
but more for define font size etc. I would like to know more about the
stuff that you talking about - tableless layouts , separating content
from presentation - any links you can suggest?
Sure :)

http://alistapart.com
http://www.glish.com/css
http://www.bluerobot.com/web/layouts
http://www.tjkdesign.com/articles/on...ss_layouts.asp
http://cssvault.com/
http://css.maxdesign.com.au
http://www.useit.com/
greets,
--
PP
Sep 6 '06 #4
Thanks for those links. by search tableless layouts I also got lots of
links about using div and css to replace table.

As what I understood from these examples, you still need nested div to
position different controls on your page. Something like
<div-container<div-left/><div-center/><div-right/></div-container>
kind the same idea as using table, but has a lots of advantage as they
all declaimed.

While, I am working on change my pages to tableless layout. My page
contains a nav menu on the left and content on the right, but the right
content contents lots of controls(gridview, checkbox...etc). I am using
<div-left/><div-right/>, should be the samplest one, but I never get
the <div-right/to position at the right of div-left, it always under
<div-left/>

Thanks
-rockdale


Przemek Ptasznik wrote:
rockdale napisal(a):
I aleways use table to position controls on my web page. I also use css
but more for define font size etc. I would like to know more about the
stuff that you talking about - tableless layouts , separating content
from presentation - any links you can suggest?

Sure :)

http://alistapart.com
http://www.glish.com/css
http://www.bluerobot.com/web/layouts
http://www.tjkdesign.com/articles/on...ss_layouts.asp
http://cssvault.com/
http://css.maxdesign.com.au
http://www.useit.com/
greets,
--
PP
Sep 6 '06 #5
rockdale wrote:
While, I am working on change my pages to tableless layout. My page
contains a nav menu on the left and content on the right, but the right
content contents lots of controls(gridview, checkbox...etc). I am using
<div-left/><div-right/>, should be the samplest one, but I never get
the <div-right/to position at the right of div-left, it always under
<div-left/>
Did you try float:left (or right) css property?
Ask google about css columns - there are a lot of useful examples.

And don't think about tableless designs as div-and-span-based
alternative to tables. Rather think about semantically valid (x)html
which can be read by any browser(including screen readers). Build your
html code using elements to express what its content means and not what
it must look like.

Pass a link to your page - it will be much easier to us to help you with
css problems.
--
PP
Sep 7 '06 #6
Thanks for your reply.

I tried float property but finally I found it is because that my left
div occupies 30% and right div occupys 70%, furthermore I still have a
margin 10px to leave a gap between these two div so the width is more
than 100% which causes the right div goes to the bottom of left div.

I still have problem with put 2 divs side by side, I am sorry I have no
link to show you my web page. I will paste the code here, see if you
can help with this problem, this code is child page that using master
page, the master page contains left and right div I talked above.

No it is the content inside the right div.

I have <div roundheaderand <div roundbodythese two are vertical,
this works fine, and I am using javascript to get the round corner make
up.

Inside <div roundbody, I have two gridview (or something else that I
may put them vertical, horizontal...etc. I am still using table here to
put these two gridview horizontally since div content does not do the
job here, I know something wrong with my div content, but could not
figure out why.

Thanks a lot

Styles.css

div.roundbody{clear:left;padding: 2px 0px 0px 0px; margin: 0px 0px 4px
0px; background-color: #e7e7e7;}
div.roundheader{margin: 0 0 0 0;background-color: #660000; padding:
0px 0px 4px 0px}

div.content
{
background-color: Transparent;
margin: 0px;
border: solid 2px #ffff00;
float: left;
clear: both;
}

-------------------------------------

aspx

-----------------------------
<asp:content contentplaceholderid="PageContent" runat="Server">

<div class="roundheader">
<h1>header name</h1>
</div>
<div class="roundbody">
<!--<div class="content">-->
<table cellspacing="0" cellpadding="2" border="0" width="100%">
<tr>
<td valign="top" style="width:48%">
<asp:GridView/>
</td>
<td style="width:2%"></td>
<td style="width:48%">
<asp:GridView/>
</td>
</tr>
</table>
</div>

Przemek Ptasznik wrote:
rockdale wrote:
While, I am working on change my pages to tableless layout. My page
contains a nav menu on the left and content on the right, but the right
content contents lots of controls(gridview, checkbox...etc). I am using
<div-left/><div-right/>, should be the samplest one, but I never get
the <div-right/to position at the right of div-left, it always under
<div-left/>
Did you try float:left (or right) css property?
Ask google about css columns - there are a lot of useful examples.

And don't think about tableless designs as div-and-span-based
alternative to tables. Rather think about semantically valid (x)html
which can be read by any browser(including screen readers). Build your
html code using elements to express what its content means and not what
it must look like.

Pass a link to your page - it will be much easier to us to help you with
css problems.
--
PP
Sep 8 '06 #7
rockdale napisał(a):
Thanks for your reply.

I tried float property but finally I found it is because that my left
div occupies 30% and right div occupys 70%, furthermore I still have a
margin 10px to leave a gap between these two div so the width is more
than 100% which causes the right div goes to the bottom of left div.
Right. Remember that width property means content width. if you apply
borders or paddings, it will be added do your width and your element
will occupy more place on screen. Second thing - floated elements
doesn't stretch parent element unless they're too floated. So it's best
to apply float property to parent (with width of 100%).
I have <div roundheaderand <div roundbodythese two are vertical,
this works fine, and I am using javascript to get the round corner make
up.
Leave jabvascript here. Look at
http://alistapart.com/articles/mountaintop/ - pure css solution.
Inside <div roundbody, I have two gridview (or something else that I
may put them vertical, horizontal...etc. I am still using table here to
put these two gridview horizontally since div content does not do the
job here, I know something wrong with my div content, but could not
figure out why.
use float again. Get rid of div-content, just place tables(grids) in
div.roundbody.
I tested for example this css code and it works:

//here goes all your css...

div.roundbody
{
float:left;
width:100%;
}
div.roundbody table
{
float:left;
width:50%;
background-color:Yellow;
}

--
PP
Sep 9 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1858
by: Joe Bonavita | last post by:
My Web forms display differently on different machine with the same resolution. The pages are designed to fit in 800*600 res but on some machines with 800*600 the form appears too big. Are there...
0
1125
by: srini | last post by:
Hi, I have an application in which it shows links on left frame and images on right frame. I am calculating the image height and width to fit to the client's window dynamically based on the...
0
877
by: sirumalla.srinivas | last post by:
Hi, I have an application in which it shows links on left frame and images on right frame. I am calculating the image height and width to fit to the client's window dynamically based on the...
11
2315
by: Neil | last post by:
Does anyone know of an add-on or other that can be implemented into an MDB front end to allow its forms and reports to look the same at different screen resolutions?
0
7242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7355
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7081
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7510
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5066
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1576
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
447
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.