|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
CSS - Set widths and realtive widths
Hi,
I am creating what is essentailly a three column table in CSS using classes The first column or span has to be 50px wide, the last column or span has to be 50px wide and.....what I want is .. .. .. .. the middle span to take up all remaining space. OK... .....I want to do this without tables. I'm only using classes defined in CSS and then span tags. Can this be done with CSS ?? ?? ?? I do not want (plase don't provide this as an answer) a) to use tables b) use javascript to figure out the screen or browswer width I only want to use span tags and CSS to define a selector or class for each of the three span tags. So bascially the code will look like <span class=leftarea></span><span class=centerarea>Text will go here yada yada ydaa</span><span class=rightarea></span> Then... I'll have 3 selectors or classes defined in CSS... Thanks!!!
__________________
~~ K. I. S . S. ~~ |
|
#2
|
||||
|
||||
|
__________________
Cheers, Jamie # skiFFie | Home of the 'accessibility module' for Drupal # Jamie Burns [me] Accessibility Module [drupal] # guidelines | search | wap resources | not getting help | fold to cure # Any form of employment is strictly prohibited ...... __________________ Let the might of your compassion arise to bring a quick end to the flowing stream of the blood and tears ..... Please hear my anguished words of truth. __________________ |
|
#3
|
||||
|
||||
|
In a simple stripped down form:
Code:
CSS
#left { position: absolute;
top: 0px;
left: 0px;
width: 50px;
}
#right { position: absolute;
top: 0px;
right: 0px;
width: 50px;
}
#center { margin-left: 50px;
margin-right: 50px;
}
HTML
<div id="center">blah blah blah</div>
<div id="left">blah blah blah</div>
<div id="right">blah blah blah</div>
Jabba_29's ref will fully explain what's going on. cheers, gary
__________________
There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing. Ask a better question, get a better answer. |
|
#4
|
|||
|
|||
|
Doesn't REALLY work
Hi,
I tried that. Perhaps I might clarify. I require images or background images to be in these cells or divs and that's the issue. If you don't put any text or content in the center div... it doesn't really expand all the way out (between the two fixed width divs). Add a border to it and you'll see. I'm so disappointed in CSS, it doesn't appear to be well thought out. Thanks..... ![]() |
|
#5
|
||||
|
||||
|
Re: Doesn't REALLY work
Quote:
cheers, gary |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > CSS - Set widths and realtive widths |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|