SunQuest
           CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 21st, 2003, 01:13 PM
please_explain please_explain is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 62 please_explain User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
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. ~~

Reply With Quote
  #2  
Old December 21st, 2003, 01:24 PM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Dev Shed God 8th Plane (8500 - 8999 posts)
 
Join Date: Feb 2002
Location: Finland
Posts: 8,643 jabba_29 User rank is General 9th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 9th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 9th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 9th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 9th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 9th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 9th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 9th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 9th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 9th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 9th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 9th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 9th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 9th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 9th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 9th Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 3 Months 3 Weeks 3 Days 18 h 37 m 28 sec
Reputation Power: 1591
Send a message via ICQ to jabba_29 Send a message via AIM to jabba_29 Send a message via MSN to jabba_29 Send a message via Yahoo to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
Check out Glish. I think number 7 is what you are after.

HTH
__________________
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.

__________________

Reply With Quote
  #3  
Old December 21st, 2003, 05:24 PM
kk5st's Avatar
kk5st kk5st is offline
Thanks Johnny Hart (BC) R.I.P.
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: May 2003
Location: Dallas
Posts: 4,539 kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 29 m 22 sec
Reputation Power: 597
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.

Reply With Quote
  #4  
Old December 21st, 2003, 06:35 PM
please_explain please_explain is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 62 please_explain User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
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.....

Reply With Quote
  #5  
Old December 22nd, 2003, 01:47 AM
kk5st's Avatar
kk5st kk5st is offline
Thanks Johnny Hart (BC) R.I.P.
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: May 2003
Location: Dallas
Posts: 4,539 kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 29 m 22 sec
Reputation Power: 597
Re: Doesn't REALLY work

Quote:
Originally posted by please_explain
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.


Simply add "background: url(someimage.png) 0 0;"

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.

It still has full width, but has 0 height. Use my example or use the example at Glish and put some of your own content in the various divs.

I'm so disappointed in CSS, it doesn't appear to be well thought out.

It's just new to you. Google for some CSS tutorials---there are a bunch. Once you're comfortable with the basics, you'll be hooked.


cheers,

gary

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS - Set widths and realtive widths


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway