FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Is it possible to '' lock '' tables ?





pll
Hello!
I'm working on a new design for a friend at the moment and I would like to know if this is possible to ''lock'' the size of a table and it's cells.

I've got background images in my table, but when I write to much text, the size of the table gets bigger and my image is deforming.

Is there anyway to LOCK the size so my image will always fit ?


I'd prefer if it could be only HTML but CSS would make it too. (I don't want javascript please)
sonam
Maybe you can solve this with CSS and max-width for table and cells but this will not work in IE. In that case you need to use both max-width and width in combination and width must come before max-width. For example:

Code:
.td_tableimage{
width: 200px;
max-width: 200px;
}


But I am not sure is this work if you insert too many letters (or numbers) without any space.

Sonam
pll
I will try! It is worth it! thank you very much!
SonLight
I think it there is a single word too long to fit on a line that it will attach a scroll bar. You can control the overflow behavior too, choosing between hiding the excess and enabling scrolling.
sonam
SonLight wrote:
I think it there is a single word too long to fit on a line that it will attach a scroll bar. You can control the overflow behavior too, choosing between hiding the excess and enabling scrolling.


Right, I am totally forgot overflow: hidden; in CSS, and I don't know how this is working with tables. But if you use div's then you can block horizontal scroll and allow vertical. In that case if someone write long text without spaces he/she will see only letters what is under defined px.

Code:
div.yscroll
{
background-color:#0000FF;
width:200px;
height:200px;
overflow-y:scroll;
overflow-x:hidden;
}


Sonam
cfvergara
Also, to control that there's two things that you can do for text which are rather well supported across browsers:

Code:

.wraparound{
  word-wrap:break-word
}


and

Code:

.ellipsis{
  text-overflow:ellipsis
}


Note that the ellipsis will add 3 characters: '...' at the end of the text and plan accordingly.
denishwilson83
MySQL enables client sessions to acquire table locks explicitly for the purpose of cooperating with other sessions for access to tables, or to prevent other sessions from modifying tables during periods when a session requires exclusive access to them. A session can acquire or release locks only for itself. One session cannot acquire locks for another session or release locks held by another session.

Locks may be used to emulate transactions or to get more speed when updating tables. This is explained in more detail later in this section.
Marcuzzo
denishwilson83 wrote:
MySQL enables client sessions to acquire table locks explicitly for the purpose of cooperating with other sessions for access to tables, or to prevent other sessions from modifying tables during periods when a session requires exclusive access to them. A session can acquire or release locks only for itself. One session cannot acquire locks for another session or release locks held by another session.

Locks may be used to emulate transactions or to get more speed when updating tables. This is explained in more detail later in this section.

the OP was referring to HTML tables and not sql tables Wink

back on topic, I think that once you give a table a specific width it will stick to that width.
Related topics
Forum
[COMMUNITY PROJECT]Frihost Forum
right and lift align on same line
What is a site without tables?
SQL creating limited user
please lock
database backup
Moving fields from one table to another
Unistalling/Removing a CMS
Removing tables, even for tabular data
[Q] mysql probleempje [solved], [Q] Goede firewall?
mysql insert into multiple tables at once?
Locking database with write access
Database error during install of drupal
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> Design Tips

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.