GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Web  >  CSS
Go To First  |  Previous Question  |  
 CSS  |  Question 39 of 39    Print  
Align a Heading and a Hyperlink in a single row
How to align a heading and a hyperlink or an image or some text in the same row (without using tables)?


  
Total Answers and Comments: 3 Last Update: October 29, 2009     Asked by: anilprasad 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
August 12, 2009 04:23:42   #1  
tarsem.singh Member Since: August 2009   Contribution: 1    

RE: Align a Heading and a Hyperlink in a single row

<h1 style "float:left;">Heading</h1><a href "link.html">Link</a>



 
Is this answer useful? Yes | No
September 14, 2009 06:09:44   #2  
aravelli Member Since: September 2009   Contribution: 1    

RE: Align a Heading and a Hyperlink in a single row
<style type "text/css">

#container {
border: 1px solid #ccc;
width: 500px;
height: 50px;
}

#container h3 #container span {
float: left;
width: 200px;
margin: 2px;
}
</style>
<body>
<div id "container">
<h3>Heading</h3>
<span><a href "#">some text</a></span>
</div>
</body>

 
Is this answer useful? Yes | No
October 29, 2009 10:26:00   #3  
kriss141 Member Since: October 2009   Contribution: 1    

RE: Align a Heading and a Hyperlink in a single row

<html>
<head>
<title>krishna</title>
<style type "text/css">
.header{
width:300px;
height:25px;
line-height:25px;
font:11px Verdana Arial Helvetica sans-serif;
padding:0 10px;
background-color:#CCCCCC;
}
.header h1{
font:11px Verdana Arial Helvetica sans-serif;
font-weight:bold;
float:left;
margin:0;
padding:0;
color:#0099CC;
}
.header a{
float:right;
color:#f90;
text-decoration:none;
}
</style>
</head>

<body>
<div class "header">
<h1>krishna</h1>
<a href "#">krishna</a>
</div>
</body>
</html>


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape