help

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

xMikex

Thread Starter
Joined
Nov 7, 2005
Messages
159
How do i make the words on a page collapse as the page is resized...like when someone shrinks the page the words warp to fit the size of the window

how do you do that?
 
Joined
Jan 6, 2006
Messages
38
As long as you just type words into the HTML you'll be okay. By that I mean don't place it within anything that is defined by pixels. If you have tables on your page, then you'll need to have it based on % if you want word wrap.

That should be all there is to it!
 

xMikex

Thread Starter
Joined
Nov 7, 2005
Messages
159
liammacg said:
As long as you just type words into the HTML you'll be okay. By that I mean don't place it within anything that is defined by pixels. If you have tables on your page, then you'll need to have it based on % if you want word wrap.

That should be all there is to it!
im still pretty new to all this website building and html so is there like a code or script that i can just put in ?
 
Joined
Jan 6, 2006
Messages
38
Here is a sample:

Code:
<p>
This is your text. If you put this into your webpage, then it will automatically
be "squished" because this text is not within a confined area.</p>
If you are using a WYSIWYG editor (Dreamweaver, Frontpage, etc...) then just type on the page and you'll be good. But, if you put the text into something that has a defined size (like a table, layer, etc.) then it will not resize like you want it to.

Basically, just put the text you want on the page! That's all there is to it! :)
 
Joined
Jan 6, 2006
Messages
38
Just another quick example. Put this into a textfile and save it as .html and then view it. Shrink the window to see what will happen.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Page Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<p>This is my webpage. If you resize the window, you will see that this text will 
  shrink with the window.</p>
<table width="500" border="1">
  <tr>
    <td>This text is inside a table. The size of this table is 500 pixels (in 
      width). So, if make the window smaller than 500 pixels wide, the text in 
      here will not wrap. You will see a scroll bar appear on the bottom of the 
      page instead.</td>
  </tr>
</table>
<br>
<table width="100%" border="1">
  <tr> 
    <td>This text is inside another table. The size of this table is 100%. This 
      means that the table will be as wide as the window itself. Because it is 
      not defined by a limited size (like the table above is) the text will wrap.</td>
  </tr>
</table>
<p>&nbsp; </p>
</body>
</html>
 

xMikex

Thread Starter
Joined
Nov 7, 2005
Messages
159
Well im using Golive for my website building and i have a table that my article is in the table is 800x600 and the font is within that table and it wont warp when the page resized. I tried without the table same thing is there some code that will automatically do that
 
Joined
Apr 14, 2001
Messages
2,382
Hello, you can add
Code:
border-collapse: collapse
to the table, that will allow it to "collapse" when the page is resized. You can also put this in a css sheet
Code:
table { 
border-collapse: collapse; 
}
Your tables will all be set to collapse, although I dont think it will work on all browsers, but it definately will on IE.
 
Joined
Jan 4, 2006
Messages
112
I think you're barking up the wrong tree with border-collapse. That css property is similar to cellspacing, it will "collapse" the space between all the cells where the borders show.

The original poster probably has some css somewhere in a stylesheet that says "body [or #wrapper or #container, etc] { width:800px }" and even though the table is explicitly set to 800px also, when it is removed the page will not resize any larger than it's parent container, which would also be set at 800.

My opinion would be to not mess with the layout of a templated site much. It could completely distort your entire page if you got rid of that 1 width statement, especially if it is a nice looking site with a lot of rounded corners, shadowing, and background images.

Try to solve your problem by NOT removing the width constraint if at all possible.
 

xMikex

Thread Starter
Joined
Nov 7, 2005
Messages
159
my site is not at all templated its from scratch so i will give Sequals fix a try
 
Joined
Jan 4, 2006
Messages
112
Oh, if it's started from scratch, then I don't understand why you would have that problem at all. Can you post your html? Border-Collapse still isn't what you'll need, it just makes the borders between cells push together.
 
Joined
Apr 14, 2001
Messages
2,382
border-collapse does not make borders between cells push together, it collapses cells and the content inside them. If you set a table to 100% it is almost the same as border collapse, I am just offering another way for this site to perform the same function.

Border -collapse is not even close to cell padding or cell spacing as you state, they are attributes entirely performing a different function.

In his quote
i have a table that my article is in the table is 800x600
I understand the he has set the table attributes on the page, not in a css so he can use the border-collapse method to allow that table to grow or shrink.

Please post your url or page code so it can be fixed for you, that is the easiest way to help you out.
 

xMikex

Thread Starter
Joined
Nov 7, 2005
Messages
159
Sequal7 said:
border-collapse does not make borders between cells push together, it collapses cells and the content inside them. If you set a table to 100% it is almost the same as border collapse, I am just offering another way for this site to perform the same function.

Border -collapse is not even close to cell padding or cell spacing as you state, they are attributes entirely performing a different function.

In his quote I understand the he has set the table attributes on the page, not in a css so he can use the border-collapse method to allow that table to grow or shrink.

Please post your url or page code so it can be fixed for you, that is the easiest way to help you out.

i would but its huge i go 2000 over the char limit
 
Joined
Jan 4, 2006
Messages
112
Try it. Look at this page, then uncomment border-collapse.
HTML:
<style>
  TABLE          { /* border-collapse: collapse; */
                   border: 5px solid yellow; }
  *#col1         { border: 3px solid black; }
  TD             { border: 1px solid red; padding: 1em; }
  TD.solid-blue  { border: 5px dashed blue; }
  TD.solid-green { border: 5px solid green; }
</style>

<P>
<TABLE>
<COL id="col1"><COL id="col2"><COL id="col3">
<TR id="row1">
    <TD> 1
    <TD> 2
    <TD> 3
</TR>
<TR id="row2">
    <TD> 4 
    <TD class="solid-blue"> 5
    <TD class="solid-green"> 6
</TR>
<TR id="row3">
    <TD> 7
    <TD> 8
    <TD> 9
</TR>
<TR id="row4">
    <TD> 10
    <TD> 11
    <TD> 12
</TR>
<TR id="row5">
    <TD> 13
    <TD> 14
    <TD> 15
</TR>
</TABLE>
Here's a good link that describes the difference between the separate and collapsed border models. http://www.w3.org/TR/REC-CSS2/tables.html#borders ;)

By the way, I couldn't find your site on the server. It says "Page Not Found."
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top