Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem using images to create rounded corner type border

Status
Not open for further replies.

selaine

Programmer
Oct 11, 2001
85
0
0
US
The look I am striving for in redesigning the look of our entire site, can be found at: This page was created as a layout tool only using Photoshop and ImageReady.

The actual page (as coded thusfar) can be found at:
My problem is this: I would love to be able to use a simple css border, but the boss doesn't like the squared corners and wants them rounded. The css border would work best, as it would collapse and expand based on content. However, I can't use it as I mentioned, so I've come up with the look and the code to imitate a css border, but with rounded edges. (I'm new to css and am learning as I go along and as a note, have not worked hardly at all using div or span - in case someone wonders why I used tables). Anyway, If you open and shrink the screen width, the table images break apart.

I'm not sure whether there would be a better way to accomplish my task, or if anyone who knows more about css could tell me how to fix the table, so it remains solid, but expands and contracts with the content.

The index.asp page for the temp address contains multiple server side includes to pull in each section of the page. My code for my index.asp page is as follows:

Code:
<HTML>
<HEAD>
<TITLE>Rock Island County Home Page</TITLE>
<META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=iso-8859-1&quot;><LINK href=&quot;/Temp/style/global.css&quot; type=text/css rel=stylesheet><LINK href=&quot;/Temp/style/text.css&quot; type=text/css rel=stylesheet>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<noscript>Your browser does not support script</noscript>

<TABLE WIDTH=&quot;100%&quot; BORDER=&quot;0&quot; CELLPADDING=&quot;0&quot; CELLSPACING=&quot;0&quot;>
	<!--#include virtual=&quot;/Temp/Header.asp&quot;-->
</TABLE>	
<TABLE WIDTH=&quot;100%&quot; BORDER=&quot;0&quot; CELLPADDING=&quot;0&quot; CELLSPACING=&quot;0&quot; valign=&quot;top&quot;>
<TR>
	<TD width=&quot;136px&quot; valign=&quot;top&quot;><!--#include virtual=&quot;/Temp/Nav.asp&quot;--></TD>
	
	<TD width=&quot;*&quot;  valign=&quot;top&quot;> <!--#include virtual=&quot;/Temp/Main_Content.asp&quot;--></TD>
	<TD width=&quot;183px&quot; valign=&quot;top&quot;><!--#include virtual=&quot;/Temp/Content_Right.asp&quot;--></TD>
</TR>
</TABLE>
</BODY>
</HTML>

The Main_Content.asp code is where the problem lies. Its code is as follows:

Code:
<CENTER><TABLE WIDTH=&quot;90%&quot; BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<TR>
		<TD ROWSPAN=2><IMG SRC=&quot;/Temp/images/Top_Left.jpg&quot; WIDTH=13 HEIGHT=13 ALT=&quot;&quot; class=&quot;topleft&quot;></TD>
		<TD COLSPAN=2 background=&quot;/Temp/images/Top_Pixel.jpg&quot; WIDTH=&quot;100%&quot; HEIGHT=2 class=&quot;toppix&quot;></TD>
		<TD ROWSPAN=2><IMG SRC=&quot;/Temp/images/Top_Right.jpg&quot; WIDTH=13 HEIGHT=13 ALT=&quot;&quot;></TD>
	   <TD background=&quot;/Temp/images/spacer.gif&quot; WIDTH=&quot;100%&quot; HEIGHT=&quot;100%&quot; class=&quot;stretch&quot;></TD>
	</TR>
	<TR>
		<TD COLSPAN=2 ROWSPAN=4 class=&quot;PgText&quot;><br><UL>	<%
    strDBPath =&quot;C:\Inetpub\[URL unfurl="true"]wwwroot\News\WhatsNew.mdb&quot;[/URL]
    
    Set cnnSearch = Server.CreateObject(&quot;ADODB.Connection&quot;)
    cnnSearch.Open &quot;Provider=MSDASQL.1;Persist Security Info=False;Data Source=WhatsNew&quot;  

    ' Build query based on the input.
    	strSQL = &quot;SELECT START, LAST, DESCRIP &quot; _
		& &quot;FROM CALENDAR &quot; _
		& &quot;WHERE START <=DATE() &quot; _
		& &quot;AND LAST >=DATE() &quot; _
		& &quot;ORDER BY START;&quot;
       
	Set rstSearch = cnnSearch.Execute(strSQL)        
%> 
              
<% 'Loop through the recordset to make each entry in the list. 
    If Not(rstSearch.BOF And rstSearch.EOF) Then
       Do While Not rstSearch.EOF
        %>
        <LI>  
        <%= rstSearch.Fields(&quot;DESCRIP&quot;).Value %>
        
        <br>
        <%
        rstSearch.MoveNext
       Loop %>
       <% else %>
       
		<% Response.Write &quot;No Announcements Today.&quot; %>

    <% End If %>
  
    <%
    ' Close our recordset and connection and dispose of the objects
    rstSearch.Close
    Set rstSearch = Nothing
    cnnSearch.Close
    Set cnnSearch = Nothing
    %>
    <!--<IMG SRC=&quot;/Temp/images/Content_Cell.jpg&quot; WIDTH=183 HEIGHT=44 ALT=&quot;&quot;>--></UL></TD>
		<TD background=&quot;/Temp/images/spacer.gif&quot; WIDTH=&quot;100%&quot; HEIGHT=&quot;100%&quot; class=&quot;stretch&quot;></TD>
	</TR>
	<TR>
		<TD ROWSPAN=2 background=&quot;/Temp/images/Left_Pixel.jpg&quot; width=13 height=&quot;100&quot;% class=&quot;leftpix&quot;></TD>
		<TD ROWSPAN=2 background=&quot;/Temp/images/Right_Pixel.jpg&quot; width=13 height=&quot;100&quot;% class=&quot;rightpix&quot;></TD>
		<TD background=&quot;/Temp/images/spacer.gif&quot; WIDTH=&quot;100%&quot; HEIGHT=&quot;100%&quot; class=&quot;stretch&quot;></TD>
		<!--<TD><IMG SRC=&quot;/Temp/images/spacer.gif&quot; WIDTH=1 HEIGHT=2 ALT=&quot;&quot;></TD>-->
	</TR>
	<TR>
		<TD background=&quot;/Temp/images/spacer.gif&quot; WIDTH=&quot;100%&quot; HEIGHT=&quot;100%&quot; class=&quot;stretch&quot;></TD>
		<!--<TD><IMG SRC=&quot;/Temp/images/spacer.gif&quot; WIDTH=1 HEIGHT=24 ALT=&quot;&quot;></TD>-->
	</TR>
	<TR>
		<TD ROWSPAN=2><IMG SRC=&quot;/Temp/images/Btm_Left.jpg&quot; WIDTH=13 HEIGHT=13 ALT=&quot;&quot;></TD>
		<TD ROWSPAN=2><IMG SRC=&quot;/Temp/images/Btm_Right.jpg&quot; WIDTH=13 HEIGHT=13 ALT=&quot;&quot;></TD>
		<TD background=&quot;/Temp/images/spacer.gif&quot; WIDTH=&quot;100%&quot; HEIGHT=&quot;100%&quot; class=&quot;stretch&quot;></TD>
		<!--<TD><IMG SRC=&quot;/Temp/images/spacer.gif&quot; WIDTH=1 HEIGHT=9 ALT=&quot;&quot;></TD>-->
	</TR>
	<TR>
		<TD COLSPAN=2 background=&quot;/Temp/images/Btm_Pixel.jpg&quot; WIDTH=&quot;100%&quot; HEIGHT=4 class=&quot;btmpix&quot;></TD>
		<TD background=&quot;/Temp/images/spacer.gif&quot; WIDTH=&quot;100%&quot; HEIGHT=&quot;100%&quot; class=&quot;stretch&quot;></TD>
		<!--<TD><IMG SRC=&quot;/Temp/images/spacer.gif&quot; WIDTH=1 HEIGHT=4 ALT=&quot;&quot;></TD>-->
	</TR>
</TABLE></CENTER>

And, just in case you need it, my global.css file is as follows:

Code:
.stretch {
	BACKGROUND-POSITION: left; 
	BACKGROUND-REPEAT: repeat;
}	
.leftpix {
	BACKGROUND-POSITION: top; 
	BACKGROUND-REPEAT: repeat-y;
}
.rightpix {
	BACKGROUND-POSITION: top; 
	BACKGROUND-REPEAT: repeat-y;
}
.toppix {
	BACKGROUND-POSITION: left; 
	BACKGROUND-REPEAT: repeat-x;
}
.btmpix {
	BACKGROUND-POSITION: left; 
	BACKGROUND-REPEAT: repeat-x;
}
.buttons {
	BACKGROUND-IMAGE: url(/Temp/images/BtnBG.jpg);
	BACKGROUND-REPEAT: no-repeat;
}
.NDir {
	BACKGROUND-IMAGE: url(/Temp/images/Dir_BG.jpg);
	BACKGROUND-REPEAT: no-repeat;
}
.NFaq {		
	BACKGROUND-IMAGE: url(/Temp/images/Faq_BG.jpg);
	BACKGROUND-REPEAT: no-repeat;
}
.NPol {
	BACKGROUND-IMAGE: url(/Temp/images/Pol_BG.jpg);
	BACKGROUND-REPEAT: no-repeat;
}
.NCal {
	BACKGROUND-IMAGE: url(/Temp/images/Cal_BG.jpg);
	BACKGROUND-REPEAT: no-repeat;
}
.image {
	border-style: dotted;
	border-color: #25385A;
	border-width: 5px;
	padding: 2px;
	margin-left: 10px;
}
.across {
	BACKGROUND-POSITION: left; 
	BACKGROUND-REPEAT: repeat-y;
}
.topleft {
	BACKGROUND-IMAGE: url(/Temp/images/Top_Left.jpg);
	BACKGROUND-REPEAT: no-repeat;
}
.topright {
	BACKGROUND-IMAGE: url(/Temp/images/Top_Right.jpg);
	BACKGROUND-REPEAT: no-repeat;
}
.btmleft {
	BACKGROUND-IMAGE: url(/Temp/images/Btm_Left.jpg);
	BACKGROUND-REPEAT: no-repeat;
}
.btmright {
	BACKGROUND-IMAGE: url(/Temp/images/Top_Right.jpg);
	BACKGROUND-REPEAT: no-repeat;
}

Hopefully, I haven't overwhelmed everyone with the issue, but the boss has also told the powers that be, that we will be launching the new look, along with new content, by the end of February. So, it's kind of a rush, as I'm the solitary web programmer. Any help would really be appreciated. Thank you!!!
 
Hi mate,

Might not be what you want to hear but your best bet is to add a spacer image to this so that it can only be resized so much, then it will not go any further.

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
To fix your table, you might like to try the following. I have added a BASE HREF to retrieve the images off your server. :)

Code:
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;>
<base href=&quot;[URL unfurl="true"]http://www.co.rock-island.il.us/Temp/&quot;>[/URL]
<html>
<head>
	<title>Untitled</title>
<style>
ul, li {
	margin: 10px;
}
.stretch {
	background-repeat: repeat-y;
}
</style>
</head>
<body>
<TABLE WIDTH=&quot;90%&quot; BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<TR>
		<TD><IMG SRC=&quot;/Temp/images/Top_Left.jpg&quot; WIDTH=13 HEIGHT=13 ALT=&quot;&quot;></TD>
		<TD valign=&quot;top&quot;><img src=&quot;/Temp/images/Top_Pixel.jpg&quot; WIDTH=&quot;100%&quot; HEIGHT=4></TD>
		<TD><IMG SRC=&quot;/Temp/images/Top_Right.jpg&quot; WIDTH=13 HEIGHT=13 ALT=&quot;&quot;></TD>
	</TR>
	<TR>
		<TD background=&quot;/Temp/images/Left_Pixel.jpg&quot; width=13 height=&quot;100&quot;% class=&quot;stretch&quot;></TD>
		<TD class=&quot;PgText&quot; valign=&quot;top&quot;>
		<UL>	
        	<LI>The fourth quarter financial report for Rock Island County available for public inspection in the office of the County Auditor.       
        	<LI>Tuesday, January 20th, 2004 - Rock Island County Board Meeting at 5:30 p.m.
		</UL></TD>
		<TD background=&quot;/Temp/images/Right_Pixel.jpg&quot; width=13 height=&quot;100&quot;% class=&quot;stretch&quot;></TD>
	</TR>
	<TR>
		<TD><IMG SRC=&quot;/Temp/images/Btm_Left.jpg&quot; WIDTH=13 HEIGHT=13 ALT=&quot;&quot;></TD>
		<TD valign=&quot;bottom&quot;><img src=&quot;/Temp/images/Btm_Pixel.jpg&quot; WIDTH=&quot;100%&quot; HEIGHT=4></TD>
		<TD><IMG SRC=&quot;/Temp/images/Btm_Right.jpg&quot; WIDTH=13 HEIGHT=13 ALT=&quot;&quot;></TD>
	</TR>
</TABLE>
</body>
</html>

Hope this helps.

Pete.


Lotus Notes Web Developer / Aptrix (LWWCM) Consultant
w: e: Pete.Raleigh(at)lclimited.co.uk
 
The following replaces the table code in Main_Content.asp, and works for me in IE 6, NN 7, Opera 7, and Mozilla 1.5:

Code:
	<TABLE WIDTH=&quot;90%&quot; BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<TR>
		<TD WIDTH=&quot;13&quot; HEIGHT=&quot;13&quot;><IMG SRC=&quot;/Temp/images/Top_Left.jpg&quot; WIDTH=13 HEIGHT=13 ALT=&quot;&quot;></TD>
		<TD WIDTH=&quot;100%&quot; BACKGROUND=&quot;/Temp/images/Top_Pixel.jpg&quot; STYLE=&quot;background-position:left top; background-repeat:repeat-x;&quot;><IMG SRC=&quot;/Temp/images/spacer.gif&quot; WIDTH=1 HEIGHT=1 ALT=&quot;&quot;></TD>
		<TD WIDTH=&quot;13&quot;><IMG SRC=&quot;/Temp/images/Top_Right.jpg&quot; WIDTH=13 HEIGHT=13 ALT=&quot;&quot;></TD>
	</TR>
	<TR>
		<TD BACKGROUND=&quot;/Temp/images/Left_Pixel.jpg&quot; STYLE=&quot;background-repeat:repeat-y;&quot;><IMG SRC=&quot;/Temp/images/spacer.gif&quot; WIDTH=1 HEIGHT=1 ALT=&quot;&quot;></TD>
		<TD CLASS=&quot;PgText&quot;>
			<UL>	
				<LI>The fourth quarter financial report for Rock Island County available for public inspection in the office of the County Auditor.
				<LI>Tuesday, January 20th, 2004 - Rock Island County Board Meeting at 5:30 p.m.
			</UL>
		</TD>
		<TD BACKGROUND=&quot;/Temp/images/Right_Pixel.jpg&quot; STYLE=&quot;background-repeat:repeat-y;&quot;><IMG SRC=&quot;/Temp/images/spacer.gif&quot; WIDTH=1 HEIGHT=1 ALT=&quot;&quot;></TD>
	</TR>
	<TR>
		<TD HEIGHT=&quot;13&quot;><IMG SRC=&quot;/Temp/images/Btm_Left.jpg&quot; WIDTH=13 HEIGHT=13 ALT=&quot;&quot;></TD>
		<TD BACKGROUND=&quot;/Temp/images/Btm_Pixel.jpg&quot; STYLE=&quot;background-position:left bottom; background-repeat:repeat-x;&quot;><IMG SRC=&quot;/Temp/images/spacer.gif&quot; WIDTH=1 HEIGHT=1 ALT=&quot;&quot;></TD>
		<TD><IMG SRC=&quot;/Temp/images/Btm_Right.jpg&quot; WIDTH=13 HEIGHT=13 ALT=&quot;&quot;></TD>
	</TR>
	</TABLE>

You'll excuse me not putting all yor ASP content back in, but I was working on a downloaded copy ;o)

Hope this helps!

Dan
 
Good. It nice to see great minds think alike [thumbsup2]
 
I've read everyone's suggestions and will try all of them, however I will have to tweak the dreamweaver example somehow to make sure it will expand and contract and I need it to. I'll let everyone know what i end up with and my final results page. (The end result should look similiar to the )
I'll also post here again if I have further issues on this. Thanks to all!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top