Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > CSS > CSS Cascading Style Sheets
| Search | Today's Posts | Mark Forums Read
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 21st, 2005, 06:33 AM
Registered User
Points: 1,897, Level: 17
Points: 1,897, Level: 17 Points: 1,897, Level: 17 Points: 1,897, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Mumbai, Maharastra, India.
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default Fixing header, and first column of table.

Following is CSS:
-----------------
div#MyRptContainer
{
    left:30px;
    width:1100px;
    height:284px;
    overflow:auto;
}
-----------------
now whenever i apply this div class to any div tag, everyting works fine except that div's left property is not working, as i want some space from left side of screen to div tag's content.


Rupen Anjaria.:)
------------------
We CAN'T avoid problems, but can solve it.
 
Old October 21st, 2005, 07:09 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

You may only specify the four offset properties (top, right, bottom, and left) if the value of the position property is relative or absolute, the default value of the position property is static, so you need to add either position: relative; or position: absolute; to the div.

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
 
Old October 21st, 2005, 07:10 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

BTW, margin is probably what you're going for here, which does not rely on a specific value for the position property.

margin: 0 0 0 30px;

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
 
Old October 21st, 2005, 08:08 AM
Registered User
Points: 1,897, Level: 17
Points: 1,897, Level: 17 Points: 1,897, Level: 17 Points: 1,897, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Mumbai, Maharastra, India.
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default

i tried & its working good.

Further what is the differe between div#classname and div.classname?

Another problem....

I have a common file in which i have written div#CSS.
in that div tag i m displaying table, since i want to fix header and first column i have define class for table also.
the problem comes when table is too short in terms of length or height.
Say height is very short so rows will be say 2 or 1, since div class has a height attribute it will display horizontal scroll bar at the end of screnn which lools very strange, can we somehow show horizontal scroll bar at the end of table irresspective of it's # of rows?
Same happes with vertical scroll bar it appears at the very right side of screen & if table is of 2 column it is again becomes very strange.

One solution is to createa separate css class for each table, but i m not satisfy with this.

I hope it is clear...if not pls reply.


Rupen Anjaria.:)
------------------
We CAN'T avoid problems, but can solve it.
 
Old October 21st, 2005, 08:24 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

> Further what is the differe between div#classname and div.classname?

The former is an id name, not a class name.

<div id='idname'> is selected by the CSS selector div#idname
<div class='classname'> is selected by the CSS selector div.classname

ID names can only occur once in a page, they are meant to be unique. Class names can occur as many times as necessary in a page.

As to your other question it's difficult to gauge what you are saying. A link to the document would help.

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
 
Old October 21st, 2005, 08:33 AM
Registered User
Points: 1,897, Level: 17
Points: 1,897, Level: 17 Points: 1,897, Level: 17 Points: 1,897, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Mumbai, Maharastra, India.
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default

as i m in web application development, i cant send u link.

But 4 an idea refert this site:
http://web.tampabay.rr.com/bmerkey/e...olumn-csv.html

As you can see we r showing a table in <div> tag.
(Que) What if we reduce the no of rows or column?
(Ans) The scroll bar will remain at the position they are.
Since this is using very small area or screen my <div> tag is using large area of screen say from middle to bottom of screen, so if rows reduces to 1 or 2 the scroll bar at the end of screen will look owkward.

Hope this give idea.
Psl reply.


Rupen Anjaria.:)
------------------
We CAN'T avoid problems, but can solve it.




Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime Column Header Text vinod_yadav1919 BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 November 29th, 2008 01:53 AM
Getting column name/header of a datagrid elygp ASP.NET 1.0 and 1.1 Professional 2 June 6th, 2007 01:07 PM
Sort Table Columns by Table Header Attribute omrieliav XSLT 4 June 7th, 2006 01:05 AM
Fixing Header & Footer shazia1 CSS Cascading Style Sheets 3 July 4th, 2005 12:22 AM
Column Header jamol BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 December 23rd, 2004 05:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.