2 replies [Last post]
dbldee
dbldee's picture
Offline
Regular
Canada
Last seen: 10 years 22 weeks ago
Canada
Timezone: GMT-4
Joined: 2007-01-29
Posts: 11
Points: 7

Hi everyone
This should be simple, but I keep getting stuck

I have a styled iframe that appears at the top of the page

<style type="text/css">
body {
background-color: #99ccff;
margin:0;
height:100%;
}
html, body, #container, iframe {
margin:0;
padding:0;
height:100%;
}
iframe {
display:block;
width:100%;
border:none;
overflow:auto;
margin-top:15px;
}
</style>

I simple like to add a hyper link to appear in the frame

Suggestions appreciated
thanks

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 37 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

But all you have shown us is

But all you have shown us is how you're styling that element! This question relates to markup, and you will need to actually explain what "keep getting stuck" means it's very vague and axiomatic otherwise you wouldn't be here asking! How are you getting stuck, what you have been trying and detail the markup you are using , how you are calling data to the iframe etc.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

dbldee
dbldee's picture
Offline
Regular
Canada
Last seen: 10 years 22 weeks ago
Canada
Timezone: GMT-4
Joined: 2007-01-29
Posts: 11
Points: 7

Hyperlink on iframe container

Thanks for replying Hugo

On further consideration I realise, the situation may not be entirely related to CSS but hoped someone may have some thoughts, that's why I'm here
additionally

<div id="container">
<iframe src="http://url_here" frameborder="2" scrolling="yes"
height="100%" width="100%"></iframe>
</div>

would cause the url to be enscapulated in the frame
I was hoping for a simple method to add a hyper link somewhere on the container eg
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Page Title</title>
<style type="text/css">
body {
background-color: #5CB3FF;
margin:0;
height:100%;
}
html, body, #container, iframe {
margin:0;
padding:0;
height:100%;
}
<strong><em><a href="http://google.com">Search Google</a></em></strong>
iframe {
display:block;
width:100%;
border:none;
overflow:auto;
margin-top:50px;
}
</style>
</head>
<body>
<div id="container">
<iframe src="url_here" frameborder="1" scrolling="yes"
height="100%" width="100%"></iframe>
</div>
</body>
</html>