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 February 3rd, 2004, 10:14 AM
jmckenna jmckenna is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Blacksburg Virginia
Posts: 3 jmckenna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
break a css layer out of a table cell

Hello,

I have too work with 3rd party code which I am not allowed to modify. It is .jsp code that calls(includes) a header file which I am alloud to modify. However the header unfortunatly is trapped inside a table cell that is 540 px wide but I want my header to span the full width of the page. I built the Header.jsp with a css layer. If I set the layer property to width=100% well 100% of 540 is 540 so it comes out short. If I set the absolute px width than at 860 screen resolution the header gets cut off. Here is some 'view source' code to just generate the .jsp to html:

</head>



<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">

<!------------------------------The Login Page calls itself to verify login info and then redirects--------------->

<TABLE width="540" border="0" cellspacing="0" cellpadding="0" >
<TR>
<TD align="left" valign="top" nowrap>
<form NAME="Login" onSubmit="return checkRequired()" ACTION="LoginValidate.jsp" METHOD="post">
<input type="hidden" name="finalize" value="0">

<!------------------------------------------------------HEADER--------------------------------------------------------->

<p>&nbsp;</p>
<div id="Layer1" style="position:absolute; width:100%; height:115px; z-index:1; top: 0;">
<table border=0 cellpadding=0 cellspacing=0 align="center" width="100%">

Blah blah blah.

So you see that a 100% table is created then a 540px table with the 'include/header.jsp' code.

So Basically is there a way to break out of the table cell? I understand 'float' allows you to overide the inherited structure but it does'nt really apply here?

here is a url: URL

The header at the top needs to span the whole page. The header file is the upper blue banner as well ast the light blue faded banner logo.

Thanks in advance...

Reply With Quote
  #2  
Old February 3rd, 2004, 12:01 PM
jmckenna jmckenna is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Blacksburg Virginia
Posts: 3 jmckenna User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I am going to answer my own question here but thanks to those for looking. In the header.jsp file I use JS to find the client screen resolution and print the <div> based on that.
<SCRIPT LANGUAGE="JavaScript">
//-->
//alert('Screen Resolution=' + screen.width + "x" + screen.height);
var height=0;
height = screen.height;

if (height >= 650) {
document.write('<div id="Layer1" style="position:absolute; width:984; height:140px; z-index:1; top: 0; left: 10;">')
} else {
document.write('<div id="Layer1" style="position:absolute; width:760; height:140px; z-index:1; top: 0; left: 10;">')
}
</script>



<table border=0 cellpadding=0 cellspacing=0 align="center" width="100%">

and so on...

Reply With Quote
  #3  
Old February 3rd, 2004, 12:02 PM
OCB OCB is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Lyon, France
Posts: 49 OCB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
It's a shame the table does not have an id tag, as this would have made grabbing it and changing the size a piece of cake.

You could walk the DOM until you find the table (perhaps it's always guaranteed to be the first table on screen, if so then use var atable = document.getElementsByTagName('table')[0]

and then use css to alter its width (that is if css can override a hardcoded width='' statement.

atable.style.width = '100%';

Hope this helps some..

Cha'mone.. OCB

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > break a css layer out of a table cell


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 4 hosted by Hostway
Stay green...Green IT