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 September 28th, 2003, 12:56 PM
sileebailey sileebailey is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 48 sileebailey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 50 m 49 sec
Reputation Power: 5
Question interaction prob. b/w div items using css

Hi there,

I am building a site using CSS :

http://www.kohlrdesigns.com/inform/

I am getting a bad interaction between two div items and I don't know how to fix it. When the site is first viewed it is fine. However, once the submenu is opened under products, the entire black background moves down with it. I have tried setting the background to absolute, but then I was getting a scroll bar at the bottom. So it is currently set to relative. However I can see that it is interacting with the nav bar in some way. I have tried moving the <div class="black></div> to different areas in the html but this only seems to mess up things. So I'm at a dead end in trying to figure out how to fix it even though I can see the problem.

The black background is created using the following code:

DIV.black{
position:relative;
top: -228;
height:100%;
left:148;
width:100%;
background-color: #000000;

}

I'm hoping somebody might be able to tell me how I can stop this interaction. I hope I have included enough info. I even read the "how to post for newbies" section please let me know if there is more info needed to give me some suggestions!

Thanks so much!!!
Jill

Reply With Quote
  #2  
Old September 28th, 2003, 01:52 PM
sciguyryan sciguyryan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Rhondda Cynon Taff, Wales
Posts: 172 sciguyryan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 24 sec
Reputation Power: 5
no problem, use absolute instead of relative in your css( this requires positioning). relative is relative to an object, it can move but, absolute cant.
__________________
Ryan Jones (RyanJ)

Reply With Quote
  #3  
Old September 28th, 2003, 02:24 PM
sileebailey sileebailey is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 48 sileebailey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 50 m 49 sec
Reputation Power: 5
thanks for the suggestion of changing it to absolute. Unfortunately when I do that, I then get a scroll bar across the bottom of the screen even though width is set at 100% and shouldn't be causing a scroll bar.....so not sure how to fix that if I change it to absolute...
Thanks,
Jill

Reply With Quote
  #4  
Old September 28th, 2003, 02:32 PM
sciguyryan sciguyryan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Rhondda Cynon Taff, Wales
Posts: 172 sciguyryan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 24 sec
Reputation Power: 5
the scroll bar should behave normally eventhough absolute positioning was used? i dont know why that would happen?

Reply With Quote
  #5  
Old September 28th, 2003, 02:45 PM
webmasta's Avatar
webmasta webmasta is offline
Senior Member
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Aug 2003
Location: Toronto
Posts: 1,614 webmasta User rank is Corporal (100 - 500 Reputation Level)webmasta User rank is Corporal (100 - 500 Reputation Level)webmasta User rank is Corporal (100 - 500 Reputation Level)webmasta User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 21 m 38 sec
Reputation Power: 7
Ok guys,, give me some good reasons why I should use css for page layout as against tables, which is rigid, but predictable across the board.

No flame wars.. just solid reasons.
__________________
webM

for $i(0..20){for($j=0;$j<=$i;$j+=2){print pack(qq{H2},
substr(qq{5f5745424d415354415f},$j,2));}print qq{\n};};

Reply With Quote
  #6  
Old September 28th, 2003, 02:58 PM
sciguyryan sciguyryan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Rhondda Cynon Taff, Wales
Posts: 172 sciguyryan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 24 sec
Reputation Power: 5
?????? what doo you mean????

Reply With Quote
  #7  
Old September 28th, 2003, 03:11 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
That was an interesting comment webmasta though maybe off topic slightly.

I am interested to see the response. I have been trying to do layouts with CSS instead of tables, and it drives me nuts.

Browsers handle styles (divs for example) for differently. At least with tables, you know what you are getting

BTW, I write XHTML 1.0 complaint html

Jamie
__________________
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
  #8  
Old September 28th, 2003, 03:21 PM
webmasta's Avatar
webmasta webmasta is offline
Senior Member
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Aug 2003
Location: Toronto
Posts: 1,614 webmasta User rank is Corporal (100 - 500 Reputation Level)webmasta User rank is Corporal (100 - 500 Reputation Level)webmasta User rank is Corporal (100 - 500 Reputation Level)webmasta User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 21 m 38 sec
Reputation Power: 7
Youre right.. off topic .. Ill start a new thread and lets see what happens

Here it is.
http://forums.devshed.com/t87293/s2...8b116ac92e.html

Last edited by webmasta : September 28th, 2003 at 03:33 PM.

Reply With Quote
  #9  
Old September 28th, 2003, 04:55 PM
sileebailey sileebailey is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 48 sileebailey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 50 m 49 sec
Reputation Power: 5
I understand that the absolute should work, but it isn't. Any other ideas? I have included my .css if that might help.

Pleeeeeaaaaassssee Its making me crazy!
Attached Files
File Type: htm cascadingsample.htm (2.4 KB, 234 views)

Reply With Quote
  #10  
Old September 29th, 2003, 02:51 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 30 m 39 sec
Reputation Power: 597
There are several opportunities for improvement.

Relative positioning holds open the vacated space, which can cause surprises. What is "top: -228;" Do you want the div moved up 228 px? in? mm? ems? %? The same applies to "left: 148;" Since height and width are set to 100%, the held open space means that more than 100% of each is rendered, thus scroll bars.

I can't seem to get the site (404), so am unable to see how it's applied. But likely, as a previous poster has suggested, absolute positioning should be used.

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
  #11  
Old September 29th, 2003, 04:13 AM
Winters Winters is offline
Bad Coder
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jul 2003
Posts: 1,742 Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 10 h 57 m 14 sec
Reputation Power: 171
Yes, use absolute with your code, but you will need to re-position the div.

DIV.black{
position:relative;
top: -228;
height:100%;
left:148;
width:100%;
background-color: #000000;

}

Reply With Quote
  #12  
Old September 29th, 2003, 04:15 AM
Winters Winters is offline
Bad Coder
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jul 2003
Posts: 1,742 Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level)Winters User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 10 h 57 m 14 sec
Reputation Power: 171
P.S. kk5st can you please, please add this to your sig:

----------
cheers,

gary
----------

It drives me up the wall seeing that you have typed it in each time :P

Reply With Quote
  #13  
Old September 30th, 2003, 12:15 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 30 m 39 sec
Reputation Power: 597
Quote:
Originally posted by PHP-Newb
P.S. kk5st can you please, please add this to your sig:

----------
cheers,

gary
----------

It drives me up the wall seeing that you have typed it in each time :P


Well, sometimes I sign differently. But, the real reason is that I don't know I'm through with my post 'til I type it.

thwwwp

gary

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > interaction prob. b/w div items using css


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