943,677 Members | Top Members by Rank

Ad:
Apr 26th, 2008
0

Taking the plunge into Layers

Expand Post »
Good day,

I took the plunge and broke away from doing lay-out with tables and decided to experiment with layers. My coding has gone well and I like the results - except for one thing.

Can anyone offer a good resource for appropriate design techniques if a user decides to increase the size of the text in their browser?

I have this nice looking web page and everything goes to crap if it gets resized. Searches I have executed in Google don't seem to deal with the issue. The closest I have come to a solution is "...know your audience and plan for a size they will accept to begin with."

Thanks in advance.
Reputation Points: 10
Solved Threads: 0
Light Poster
dwlamb_001 is offline Offline
32 posts
since Feb 2008
Apr 27th, 2008
0

Re: Taking the plunge into Layers

Try a search on google on

CSS Liquid Layouts.

I do not have much idea about that. But it is possible.
Reputation Points: 673
Solved Threads: 125
Practically a Posting Shark
Sky Diploma is offline Offline
818 posts
since Mar 2008
Apr 27th, 2008
0

Re: Taking the plunge into Layers

Thanks for the idea on search terms.
Reputation Points: 10
Solved Threads: 0
Light Poster
dwlamb_001 is offline Offline
32 posts
since Feb 2008
May 5th, 2008
0

Re: Taking the plunge into Layers

Is it possible to use div tags, using relative positioning, to have two columns so that the top line of two blocks line up?

I'm coding an online version of a c.v. Using a table scheme, I could achieve this with coding a row like this:
html Syntax (Toggle Plain Text)
  1. <tr valign="top">
  2. <td width="85%">
  3. <p class="c5">
  4. Job Title
  5. </p>
  6. <p class="c4">
  7. Company and City
  8. </p>
  9. <p class="c4">
  10. Job Description and other details
  11. </p>
  12. </td>
  13. <td width="15%" nowrap="nowrap">
  14. <p class="yrs">
  15. Dates there
  16. </p>
  17. <p class="c4">
  18. <br />
  19. </p>
  20. </td>
  21. </tr>

This would display the time served at a company in a new column, lining up with the top line of the first column.

In CSS I have the following code:

HTML Syntax (Toggle Plain Text)
  1. <div style="position: relative; background-color: blue;
  2. left: 0px; top: 0px; width: 80%; height: automatic; z-index: 4">
  3. <p class="c5">
  4. Company
  5. </p>
  6. <p class="c4">
  7. Job Title
  8. </p>
  9. <p class="c4">
  10. Description.
  11. (This can be quite long and
  12. is a key factor for making
  13. the height automatic since
  14. </p>
  15. </div>
  16. <div style="position: relative; background-color: blue;
  17. left: 0px; top: 5px; width: 20%; margin-left: 80%;
  18. height: automatic; z-index: 4">
  19. <p class="yrs">
  20. yyyy - yyyy
  21. </p>
  22. </div>

The desired result is 67% of what I want. The years display one line below the information provided in the description instead of at the top, but to the right where I want it.

I don't think positioning with absolutes is viable because the height of the blocks for describing a job will vary on the left. As well, there is text above this area that would make coding absolutes very difficult to achieve.
Reputation Points: 10
Solved Threads: 0
Light Poster
dwlamb_001 is offline Offline
32 posts
since Feb 2008
May 6th, 2008
1

Re: Taking the plunge into Layers

are you displaying tabular information ?

it very much looks like it.

one thing is tables are NOT bad. But are simply bad when using them for entirely different purposes than they were created for.

If you have tabular data use tables.
Reputation Points: 66
Solved Threads: 56
Posting Pro in Training
Fungus1487 is offline Offline
459 posts
since Apr 2007
May 6th, 2008
0

Re: Taking the plunge into Layers

Click to Expand / Collapse  Quote originally posted by Fungus1487 ...
are you displaying tabular information ?

it very much looks like it.

one thing is tables are NOT bad. But are simply bad when using them for entirely different purposes than they were created for.

If you have tabular data use tables.
I think you need to look at my message again. Yes, I have table data in the message as an example of how I would code in tables what I am trying to achieve with CSS. I want to know if there is a way to achieve the same results using CSS.
Last edited by dwlamb_001; May 6th, 2008 at 1:03 pm.
Reputation Points: 10
Solved Threads: 0
Light Poster
dwlamb_001 is offline Offline
32 posts
since Feb 2008
May 6th, 2008
0

Re: Taking the plunge into Layers

well i am almost certain you cant use relative positioning with the technique you are using but i have frequently used the opening div as a placeholder for inner relative elements.

E.g if you move your css into an outer div and wrap what you already have. (without moving the position:relative information) you get.

HTML and CSS Syntax (Toggle Plain Text)
  1. <div style="float:right;width:20%;">
  2. <div style="position:relative;background-color:blue;left:0px;top:5px;z-index:4;">
  3. <p class="yrs">yyyy - yyyy</p>
  4. </div>
  5. </div>
  6. <div style="width: auto;margin-right:20%;">
  7. <div style="position:relative;background-color:blue;left:0px;top:0px;z-index: 4">
  8. <p class="c5">Company</p>
  9. <p class="c4">Job Title</p>
  10. <p class="c4">Description. (This can be quite long and is a key factor for making the height automatic since</p>
  11. </div>
  12. </div>

im still not 100% sure what your after. Hopefully that helps.
Reputation Points: 66
Solved Threads: 56
Posting Pro in Training
Fungus1487 is offline Offline
459 posts
since Apr 2007
May 7th, 2008
0

Re: Taking the plunge into Layers

Fungus! Excellent. That's exactly what I was looking for.
Reputation Points: 10
Solved Threads: 0
Light Poster
dwlamb_001 is offline Offline
32 posts
since Feb 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: HTML code for a freight calculator?
Next Thread in HTML and CSS Forum Timeline: Smaller image to larger Image on rollover





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC