Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 11-15-2011, 02:57 PM Is CSS the cause?
Extreme Talker

Posts: 193
Name: Adam Moseley
Trades: 0
I have a website and I'm struggling to get a duplicate div to show, can you help?

The CSS is;
HTML Code:
#box
{
	width:360px;
	height:400px;
	background-image:url(/test/box.png);
	background-repeat:no-repeat;
	padding:10px;
}
.link
{
	background-image:url(/test/box2.png);
	width:740px;
	height:130px;
	clear:both;
}
And the divs are here;

HTML Code:
    	<div id="box" class="link">
    	
    	
   	<iframe src="index.php" frameborder="0" scrolling="no" width="725px" height="200px" align="middle" style="margin-left:auto; margin-right:auto;"/>
  
	
	</div>
	<div id="box" class="link">
    	
    	
   	<iframe src="index.php" frameborder="0" scrolling="no" width="725px" height="200px" align="middle" style="margin-left:auto; margin-right:auto;"/>
  
	
	</div>
The second iframe is not showing, any ideas why?
aadam is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-15-2011, 03:19 PM Re: Is CSS the cause?
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,960
Name: Keith Marshall
Location: Connecticut
Trades: 0
I don't know if this is the cause for your issue, but something to keep in mind. Id's must be unique, html markup should never use the same id on multiple elements. CSS styles defined that are referenced by id (#) will supercede class style definitions.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is online now
Reply With Quote
View Public Profile
 
Old 12-15-2011, 02:45 AM Re: Is CSS the cause?
Skilled Talker

Posts: 63
Name: Kaitlyn Em
Trades: 0
it is not possible to create same name id for different div it should be unique but you can use class for applying style on different div.

this code really help you


<html>
<head>
<script type="text/css">

#box
{
background-image:url(/test/box.png);
background-repeat:no-repeat;
width:400px;
height:400px;
padding:10px;

}
.link
{
width:740px;
height:130px;
background-image:url(/test/box2.png);

}

#box1
{
background-image:url(/test/box.png);
background-repeat:no-repeat;
width:400px;
height:400px;
padding:10px;

}

</script>

</head>

<body>
<div id="box" class="link">

<iframe style="margin-left: auto; margin-right: auto;" src="text.html" width="725" height="200" frameborder="0" scrolling="no" ></iframe>

</div>

<div id="box1" class="link">

<iframe style="margin-left: auto; margin-right: auto;" src="ne.html" width="725" height="200" frameborder="0" scrolling="no" ></iframe>



</div>
</body>
</html>
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by cyberdesignz; 12-15-2011 at 02:49 AM..
cyberdesignz is offline
Reply With Quote
View Public Profile
 
Old 12-16-2011, 09:36 AM Re: Is CSS the cause?
Physicsguy's Avatar
404 - Title not found

Posts: 1,060
Name: Scott Kaye
Location: Ontario
Trades: 0
Or just use multiple classes...

Code:
.box{
	width:360px;
	height:400px;
	background-image:url(/test/box.png);
	background-repeat:no-repeat;
	padding:10px;
}
.link{
	background-image:url(/test/box2.png);
	width:740px;
	height:130px;
	clear:both;
}
Code:
    	<div class="box link">
    	
    	
   	<iframe src="index.php" frameborder="0" scrolling="no" width="725px" height="200px" align="middle" style="margin-left:auto; margin-right:auto;"/>
  
	
	</div>
	<div class="box link">
    	
    	
   	<iframe src="index.php" frameborder="0" scrolling="no" width="725px" height="200px" align="middle" style="margin-left:auto; margin-right:auto;"/>
  
	
	</div>
__________________

Please login or register to view this content. Registration is FREE
Physicsguy is offline
Reply With Quote
View Public Profile Visit Physicsguy's homepage!
 
Reply     « Reply to Is CSS the cause?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20165 seconds with 11 queries