Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > CSS
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 11-06-2009, 01:36 PM
  #1
karlos
Novice (Level 1)
 
Join Date: Nov 2009
Posts: 4
iTrader: (0)
karlos is an unknown quantity at this point
min-height with display: table Grrr

Took me ages to discover why min-height wasn't working. It was when I had set the display: attribute to one of the following

table - table-row or table-cell

Grrr... I thought it would be a good idea to leave behind the old table layouts and move to the new css-table layouts. Last time I tried I ended-up doing floats and fixed width layouts to accommodate IE but this time I thought I'll simply do the 'new n easy' css table layout then do a seperate css sheet to cope with IE.

But this new way just doesn't seem to work... I have images effecting text in other 'cells' and now I realize the min-height doesn't work when using the above display attributes. What am I missing, why so hard? Bound to be something simply.

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

html doc

<!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" lang="en-US">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="index.css" />
</head>

<body>
<div class="height">
<div class="liner">
If the 'height' class has a display of - display: block; all is fine but id - display: table, display: table row, display: table-cell it all collapses eventhough I have set a minimum height ie... min0height: 600px;
</div>
</div>
</body>
</html>

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

css doc

.height {
display: table-cell;
border: 1px solid black;
}

.liner {
display: block;
min-width:400px
min-height: 400px;
}

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

Any advice would be appreciated.

In Christ, Karl.
karlos is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-06-2009, 01:45 PM
  #2
Pegasus
Extremely Flighty Admin
 
Pegasus's Avatar
 
Join Date: Nov 2001
Location: 35º South of Santa Claus
Posts: 21,468
iTrader: (0)
Pegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to all
I don't think you can use height as an id. It's also an element.
__________________


Decaf is the root of all evil...
HTMLForums Awards 2008
Pegasus is online now   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-06-2009, 02:06 PM
  #3
karlos
Novice (Level 1)
 
Join Date: Nov 2009
Posts: 4
iTrader: (0)
karlos is an unknown quantity at this point
Quote:
Originally Posted by Pegasus View Post
I don't think you can use height as an id. It's also an element.
Hi, thanks for the response.

I'm using class not id
I'm using min-height not height

There's no problem with height at all, just this min-height when using css table layouts, if I just knew what and why, what therules where then just maybe I could start using CSS layouts but as it stands I just don't know what works, why things work and others don't.

In Christ, Karl.
karlos is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-06-2009, 02:10 PM
  #4
Pegasus
Extremely Flighty Admin
 
Pegasus's Avatar
 
Join Date: Nov 2001
Location: 35º South of Santa Claus
Posts: 21,468
iTrader: (0)
Pegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to all
Class or id, it doesn't make any difference. You can't use it as a name. It's an element. You're confusing the browser.
__________________


Decaf is the root of all evil...
HTMLForums Awards 2008
Pegasus is online now   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-08-2009, 01:00 PM
  #5
karlos
Novice (Level 1)
 
Join Date: Nov 2009
Posts: 4
iTrader: (0)
karlos is an unknown quantity at this point
Quote:
Originally Posted by Pegasus View Post
Class or id, it doesn't make any difference. You can't use it as a name. It's an element. You're confusing the browser.
I'm missing something here, how come I can put 'height' in the css for one of the table-cells (that's fine) but not min-height or max-height?

I have no issue with height: 300px; but max/min-height: 300px; in the CSS external style sheet is a big no no.

So regardless if Height: 300px; is an element (can't understand how it is) height: works.

Please go easy when you explain this and assume I know nothing, that's for your help, I do appreciate it.

In Christ, Karl.
karlos is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-08-2009, 01:56 PM
  #6
Excavator
Lord (Level 16)
 
Join Date: Dec 2006
Location: Alaska
Posts: 735
iTrader: (0)
Excavator is on a distinguished road
Quote:
Originally Posted by Pegasus View Post
Class or id, it doesn't make any difference. You can't use it as a name. It's an element. You're confusing the browser.
That's not true, .height is a class - height is a property.
Even if you wanted to use an element as a class name it would not confuse the browser because the . -or the # if you wanted to do the same thing with as an id- in front of it designates it a class.
__________________
Validate often, DURING development! Use it like a splelcheker.
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-08-2009, 01:59 PM
  #7
Excavator
Lord (Level 16)
 
Join Date: Dec 2006
Location: Alaska
Posts: 735
iTrader: (0)
Excavator is on a distinguished road
Quote:
Originally Posted by karlos View Post
I'm missing something here, how come I can put 'height' in the css for one of the table-cells (that's fine) but not min-height or max-height?

I have no issue with height: 300px; but max/min-height: 300px; in the CSS external style sheet is a big no no.

So regardless if Height: 300px; is an element (can't understand how it is) height: works.

Please go easy when you explain this and assume I know nothing, that's for your help, I do appreciate it.

In Christ, Karl.
Have a look at what w3schools has to say about the display property -
Quote:
Note: No versions of Internet Explorer (including IE8) support the property values "inherit", "inline-table", "run-in", "table", "table-caption", "table-cell", "table-column", "table-column-group", "table-row", or "table-row-group".
__________________
Validate often, DURING development! Use it like a splelcheker.
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-08-2009, 02:10 PM
  #8
Excavator
Lord (Level 16)
 
Join Date: Dec 2006
Location: Alaska
Posts: 735
iTrader: (0)
Excavator is on a distinguished road
Quote:
Originally Posted by karlos View Post
I'm missing something here
Yes, a missing ; after the min-width line.

Try it like this
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" lang="en-US">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type="text/css">
.height {
display: table-cell;
border: 1px solid black;
}

.liner {
display: block;
min-width:400px;
min-height: 400px;
}

</style>
</head>

<body>
<div class="height">
<div class="liner">
If the 'height' class has a display of - display: block; all is fine but id - display: table, display: table row, display: table-cell it all collapses eventhough I have set a minimum height ie... min0height: 600px;
</div>
</div>
</body>
</html>
Check out the links about validation in my sig below. The validators come in very handy for finding things just like this.
__________________
Validate often, DURING development! Use it like a splelcheker.
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


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



 
  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
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 09:24 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.