|
Thank you for your words, I feel that with the promiss of html5 and css3 we face interesting times ahead. My current design will most likely change a bit more as I back off of the overly flexible layout to a more traditional centered and fixed width layout. This flex layout I have was a fun idea, but I see issues with this design such as if I want to add a banner exchange. Ah well, the fun never ends, and honestly would we ever really want it to?
All the Best!
Chris J
|
|
|
|
|
I'm creating a tabbed page. I'm stuck with setting the images to the tab headers.
Coding
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Try Tabbed Page Example</title>
<script type="text/javascript" >
function tabview_aux(TabViewId, id)
{
var TabView = document.getElementById(TabViewId);
var Tabs = TabView.firstChild;
while (Tabs.className != "Tabs" ) Tabs = Tabs.nextSibling;
var Tab = Tabs.firstChild;
var i = 0;
do
{
if (Tab.tagName == "A")
{
i++;
Tab.href = "javascript:tabview_switch('"+TabViewId+"', "+i+");";
Tab.className = (i == id) ? "Active" : "";
Tab.blur();
}
}
while (Tab = Tab.nextSibling);
var Pages = TabView.firstChild;
while (Pages.className != 'Pages') Pages = Pages.nextSibling;
var Page = Pages.firstChild;
var i = 0;
do
{
if (Page.className == 'Page')
{
i++;
if (Pages.offsetHeight) Page.style.height = (Pages.offsetHeight-2)+"px";
Page.style.overflow = "auto";
Page.style.display = (i == id) ? 'block' : 'none';
}
}
while (Page = Page.nextSibling);
}
function tabview_switch(TabViewId, id) { tabview_aux(TabViewId, id); }
function tabview_initialize(TabViewId) { tabview_aux(TabViewId, 1); }
</script>
<style>
div.TabView div.Tabs {
height: 36px;
overflow: hidden;
}
div.TabView div.Tabs a {
float: left;
display: block;
width: 148px;
text-align: center;
height: 36px;
line-height: 30px;
vertical-align: middle;
background: url('images/tab1-h.jpg') no-repeat;
text-decoration: none;
font-family: "Times New Roman", Serif;
font-weight: 900;
font-size: 13px;
color: #fff;
margin-right:1px;
}
div.TabView div.Tabs a:hover, div.TabView div.Tabs a.Active {
background: url('images/tab1.jpg') no-repeat;
}
div.TabView div.Pages {
clear: both;
overflow: hidden;
}
div.TabView div.Pages div.Page {
height: 100%;
padding: 0px;
overflow: hidden;
}
div.TabView div.Pages div.Page div.Pad {
padding: 3px 18px;
}
</style>
</head>
<body>
<div class="TabView" id="TabView-demo" style="width: 740px; height: 192px; text-align: left; background: url('images/bgTabMenu 2.jpg') no-repeat;">
<!-- *** Tabs ************************************************************** -->
<div class="Tabs" style="width: 740px;">
<a>Academics</a>
<a>Notifications</a>
<a>Opportunities</a>
<a>Announcements</a>
<div style="width:144px; height:36px; float:right; top:0; margin:0; padding:0; background: url('images/tab2-h.jpg') no-repeat"> </div>
</div>
<!-- *** Pages ************************************************************* -->
<div class="Pages" style="width: 740px; height: 156px; text-align: left;">
<!-- *** Page1 Start *** -->
<div class="Page">
<div class="Pad">
<br>
<p> You are Viewing Tab Page 1.</p>
</div>
</div>
<!-- *** Page1 End ***** -->
<!-- *** Page2 Start *** -->
<div class="Page">
<div class="Pad">
<br>Categories include:<br>
<br>
<p> You are Viewing Tab Page 2.</p>
</div>
</div>
<!-- *** Page2 End ***** -->
<!-- *** Page3 Start *** -->
<div class="Page">
<div class="Pad">
<br>
<p> You are Viewing Tab Page 3.</p>
</div>
</div>
<!-- *** Page3 End ***** -->
<!-- *** Page4 Start *** -->
<div class="Page">
<div class="Pad">
<br>
<br>Categories include:<br>
<br>Categories include:<br>
<p> You are Viewing Tab Page 3.</p>
</div>
</div>
<!-- *** Page4 End ***** -->
</div>
<script type="text/javascript">
tabview_initialize('TabView-demo');
</script>
</body>
</html>
The above coding is working fine how i need. But still i need some modifications which satisfies my work defenition..
And the modifications which i need to satisfy client requirement are mentioned as below.
Modifications needed only in setting the background of the tabs as follows:
1. Acadamics tab contains 2 images (tab1-h.jpg) as background and when hover/clicked the image (tab1.jpg) should get displayed.
2. All the other 3 tabs uses the images (centre-h.jpg) and (centre.jpg) during hover/clicked of the tabs.
I need the same functionality which is currently present in my code. Only i need the modifications which i've mentioned...
I need it urgently.
Thanks
M.Sworna Vidhya
|
|
|
|
|
programaticaly change the background img / css classes for mouseover & out.
|
|
|
|
|
<%
strSearch = "SELECT Brief,Area,City,Country,Telephone,File Data" & "FROM [registration] " & "WHERE City LIKE '" & Replace(request.Form("txtsearch"), "'", "''") & "%' "
rsSearch.open strSearch, strconn, 3,3
%>
<%
On error resume next
rsSearch.movefirst
while Not rsSearch.eof
%>
</p>
<table>
<tr>
<td height="20" colspan="4" class="fontbold"> <%=rsSearch("Brief")%> </td>
</tr>
<tr>
<td width="217" height="20" class="font"> <%=rsSearch("Area")%> </td>
<td width="99" class="font"> <%=rsSearch("City")%> </td>
<td width="94" class="font"> <%=rsSearch("Country")%> </td>
<td width="225" class="font"> <%=rsSearch("Telephone")%> </td>
<td width="200">
<%
if not (rsSearch.EOF and rsSearch.BOF) then
PicSize = rsSearch("File Data").ActualSize
if PicSize > 0 then
Response.BinaryWrite rsSearch("File Data").GetChunk(rsSearch("File Data").ActualSize)
End if
End If
response.End
'if rsSearch.eof then
' respond.end
' else
'Response.ContentType ="image/jpeg"
'Response.BinaryWrite(rsSearch("File Data"))
'end if
%>
</td>
</tr>
<%
rsSearch.Movenext
%>
<%
Wend
%>
modified on Thursday, October 14, 2010 9:07 AM
|
|
|
|
|
Your formatting has caused the entire forum to not display correctly. Please remove it or format appropriately.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Don't know - but you might want to look at your first line:
dababy wrote: strSearch = "SELECT Brief,Area,City,Country,Telephone,File Data" & "FROM [registration] " & "WHERE City LIKE '" & Replace(request.Form("txtsearch"), "'", "''") & "%' "
getting rid of the totally unneccesary concatenations, you end up with
strSearch = "SELECT Brief,Area,City,Country,Telephone,File DataFROM [registration] WHERE City LIKE '" & Replace(request.Form("txtsearch"), "'", "''") & "%' "
which will cause an error at ...File DataFROM [reg...
|
|
|
|
|
Actually this is where I am having issues with see below.
<%
if not (rsSearch.EOF and rsSearch.BOF) then
PicSize = rsSearch("File Data").ActualSize
if PicSize > 0 then
Response.BinaryWrite rsSearch("File Data").GetChunk(rsSearch("File Data").ActualSize)
End if
End If
response.End
if rsSearch.eof then
respond.end
else
Response.ContentType ="image/jpeg"
Response.BinaryWrite(rsSearch("File Data"))
end if
%>
|
|
|
|
|
Well can't you at least use the error object to display/log the error number/description, to at least give you some idea of what the problem is (and something to Google for)?
|
|
|
|
|
and what made you decide PRE tags aren't good any more?
|
|
|
|
|
Column names should not have spaces in them. If you insist on doing such a horrible thing you need to enclose the column name in square brackets [] when you do queries.
|
|
|
|
|
I think you must check out that,if you want to retrieve any image from database you must save that image any temporary location. then you can specify the location of thumbnail..
All the best
Anupam Singh
|
|
|
|
|
How to set background image for iframe? If set, it is not working in IE. But works with Mozilla and Google Chrome. How to fix bug in IE for displaying background image in iframe.
M Sworna Vidhya
|
|
|
|
|
Going from memory here, but it may help...
In most browsers you can set the background CSS property to transparent...but not IE. In IE you must also set the background of the content/page loaded in the IFrame to transparent.
I would assume that you need to set the background image property for the content/page that you are loading inside of the IFrame, not the IFrame element itself
|
|
|
|
|
I have a Header that in CSS is font-size:xx-large , however I want it to be larger.
How do I set a larger font?
(Using Visual Web Developer 2008)
.header
{
margin-left:auto;
margin-right:auto;
width:1024px;
height:100px;
background-color:#AAFBF9;
padding-top:5px;
font-size:xx-large;
text-align:center;
}
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC League Table Link
CCC Link[ ^]
|
|
|
|
|
|
I had tried that, had no fun.
EDIT: Sorted!
Forgot the PX!
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC League Table Link
CCC Link[ ^]
modified on Monday, October 11, 2010 4:53 PM
|
|
|
|
|
Dalek Dave wrote: Forgot the PX!
Dave
Find Me On: Web| Facebook| Twitter| LinkedIn
CPRepWatcher now available as Packaged Chrome Extension, visit my articles for link.
|
|
|
|
|
You can set a larger size using something like px (pixels). This isn't a great solution however, as it's not very friendly for scalable pages. I would use something like em instead. You can set it to something like font-size:2.2em .
|
|
|
|
|
I would also suggest setting your body font-size to 62.5%. This way, it is easier to convert between em and px.
For example:
body{
font-size: 62.5%;
}
p{
font-size: 1.2em;
}
|
|
|
|
|
Thanks, good idea.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC League Table Link
CCC Link[ ^]
|
|
|
|
|
|
Always a good idea
|
|
|
|
|
I've created a seperate html files for navigation, content and footer. I want to club those files. All the navigation, content, footer files resides in the same directory where the index.html file resides. I want to include the above mentioned html files inside the index.html. I have tried using the following in index.html file
<!--#include virtual="topbanner.html" -->
I also tried using the asp code which also fails. I tried with asp by changing all the html file extensions as .asp. Then i tried to place the following asp code in index.asp file as
<!--#include file="topbanner.asp" -->
Kindly solve my problem. This is an urgent thing to do for me.
M.Sworna Vidhya
|
|
|
|
|
Is it a full html file that you're trying to include? If so, this will cause you a problem as you should only try and import the relevant elements, and not the full page. BTW - convention seems to be to use .inc extension for include files.
|
|
|
|
|
The only way I can think to do it outside of something serverside would be to use javascript with a document.write()....maybe this will help http://www.cryer.co.uk/resources/javascript/script4.htm[^]
I would use php to do what you want on the server side of the fence. PHP has a number of related function like include() that I use to seperate my html output into different sections. I do this by making a number of small php files like....
header.php
menu.php
footer.php
these can all contain the basic html output like this example
header.php
-----------
<html>
<head>
<title>My Site</title>
<body>
.....end header.php
AND
menu.php
-------------
<div>
<ul class='menu'>
<li><a href=''>Link 1</a></li>
<li><a href=''>Link 2</a></li>
</ul>
</div>
hope that helps...
AND
footer.php
-------------
</body>
</html>
......end footer.php
NOW you just call these from a page script like this.
index.php
--------------
include('header.php');
include('menu.php');
// start page content....
// end page content....
include('footer.php');
|
|
|
|