DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   HTML and CSS (http://www.daniweb.com/forums/forum143.html)
-   -   Taking the plunge into Layers (http://www.daniweb.com/forums/thread121120.html)

dwlamb_001 Apr 26th, 2008 12:46 pm
Taking the plunge into Layers
 
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.

Sky Diploma Apr 27th, 2008 3:04 pm
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.

dwlamb_001 Apr 27th, 2008 6:41 pm
Re: Taking the plunge into Layers
 
Thanks for the idea on search terms.

dwlamb_001 May 5th, 2008 9:14 pm
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:
<tr valign="top">
  <td width="85%">
    <p class="c5">
      Job Title
    </p>
    <p class="c4">
      Company and City
    </p>
    <p class="c4">
      Job Description and other details
    </p>
  </td>
  <td width="15%" nowrap="nowrap">
    <p class="yrs">
      Dates there
    </p>
    <p class="c4">
      <br />
    </p>
  </td>
</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:

<div style="position: relative; background-color: blue; 
  left: 0px; top: 0px; width: 80%; height: automatic; z-index: 4">
  <p class="c5">
    Company
  </p>
  <p class="c4">
    Job Title
  </p>
  <p class="c4">
    Description. 
    (This can be quite long and
    is a key factor for making
    the height automatic since
  </p>
</div>
<div style="position: relative; background-color: blue;
  left: 0px; top: 5px; width: 20%; margin-left: 80%;
  height: automatic; z-index: 4">
  <p class="yrs">
    yyyy - yyyy
  </p>
</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.

Fungus1487 May 6th, 2008 8:02 am
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.

dwlamb_001 May 6th, 2008 12:02 pm
Re: Taking the plunge into Layers
 
Quote:

Originally Posted by Fungus1487 (Post 600749)
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.

Fungus1487 May 6th, 2008 1:46 pm
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.

<div style="float:right;width:20%;">
        <div style="position:relative;background-color:blue;left:0px;top:5px;z-index:4;">
          <p class="yrs">yyyy - yyyy</p>
        </div>
</div>
<div style="width: auto;margin-right:20%;">
        <div style="position:relative;background-color:blue;left:0px;top:0px;z-index: 4">
          <p class="c5">Company</p>
          <p class="c4">Job Title</p>
          <p class="c4">Description. (This can be quite long and is a key factor for making the height automatic since</p>
        </div>
</div>

im still not 100% sure what your after. Hopefully that helps.

dwlamb_001 May 7th, 2008 9:23 pm
Re: Taking the plunge into Layers
 
Fungus! Excellent. That's exactly what I was looking for.


All times are GMT -4. The time now is 4:53 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC