473,387 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Please help in aligning the layout

245 100+
Hey all,
I have alignment problem in layout. I am using slideshow technology. It shows images in background and text over the background image once we take mouse over the link buttons.
Now what my problem is

Background image section is coming at top and menu comes just under the banner. I want that menu (navigation) comes at left position and in the same line banner comes at right position.
Here is URL.



kindly help me out to sort out my problem. I will be very grateful.


kind regards,
Mohsin Rafique
Jan 7 '10 #1
8 1790
Dormilich
8,658 Expert Mod 8TB
you mean something like float: left; ?
Jan 7 '10 #2
neovantage
245 100+
yes that's what i mean. I am attaching an images which tells you what layout i have currently and what required layout i want actually.
Attached Images
File Type: jpg current-view.jpg (12.2 KB, 315 views)
File Type: jpg required-view.jpg (11.9 KB, 282 views)
Jan 7 '10 #3
Dormilich
8,658 Expert Mod 8TB
yea, instead of absolute positioning, try to float it.
Jan 7 '10 #4
neovantage
245 100+
But using float property now it is giving jerks. Because when we take mouse over the link button it loads image towards down and then take it up and also banner section is not align top. It comes just down to some place. Here is my code
HTML files
[code][
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" href="includes/slideshow.css" type="text/css" media="screen" />
<script type="text/javascript" src="includes/jquery.js"></script>
<script type="text/javascript" src="includes/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="includes/slideshow.js"></script>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" align="center" width="1100">
<tr>
<td align="center" valign="top" width="1100">
<!-- Features -->
<div id="features">
<!-- Feature Nav -->
<ul id="feature-nav">
<li id="button1"><a href="#." rel="#feature-1">Lorem Ipsum</a></li>
<li id="button2"><a href="#." rel="#feature-2">Lorem Ipsum</a></li>
<li id="button3"><a href="#." rel="#feature-3">Lorem Ipsum</a></li>
<li id="button4"><a href="#." rel="#feature-4">Lorem Ipsum</a></li>
</ul>
<!-- /Feature Nav -->
<div class="feature" id="feature-1">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ac eleifend urna. Aenean felis est, dignissim nec dapibus sit amet, aliquet sit amet velit.<br /><br />
<a href="#.">Read More</a></p>
</div>
<div class="feature" id="feature-2">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ac eleifend urna. Aenean felis est, dignissim nec dapibus sit amet, aliquet sit amet velit.<br /><br />
<a href="#.">Read More</a></p>
</div>
<div class="feature" id="feature-3">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ac eleifend urna. Aenean felis est, dignissim nec dapibus sit amet, aliquet sit amet velit.<br /><br />
<a href="#.">Read More</a></p>
</div>
<div class="feature" id="feature-4">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus ac eleifend urna. Aenean felis est, dignissim nec dapibus sit amet, aliquet sit amet velit.<br /><br />
<a href="#.">Read More</a></p>
</div>
</div>
<!-- /Features -->
</td>
</tr>
</table>
</body>
</html>
/CODE]

CSS file
Expand|Select|Wrap|Line Numbers
  1. body{
  2.     margin:0px;
  3.     padding:0px;
  4. }
  5. /*
  6. Slideshow Addition
  7. */
  8. #features {
  9.     background: #2c3f4d;
  10.     height: 400px;
  11.     position: relative;
  12.     width: 1100px;
  13. }
  14. #features .feature {
  15.     height: 340px;
  16.     left: 0;
  17.     float:right;
  18.     /*position: absolute;*/
  19.     top: 0;
  20.     width: 880px;
  21. }
  22. #features #feature-2,
  23. #features #feature-3,
  24. #features #feature-4 {
  25.     display: none;
  26. }
  27. #features #feature-1 h2, #features #feature-2 h2, #features #feature-3 h2, #features #feature-4 h2 {
  28.     color: #ffffff;
  29.     font-size: 26px;
  30.     font-family: Times, "Times New Roman", serif;
  31.     font-weight: 500;
  32.     text-shadow: 1px 1px #000;
  33.     padding-top: 185px;
  34.     padding-left: 30px;
  35. }
  36. #features h2 span.yellow {
  37.     color: #f9edc3;
  38. }
  39. #features #feature-1 p, #features #feature-2 p, #features #feature-3 p, #features #feature-4 p {
  40.     color: #ececec;
  41.     font-size: 12px;
  42.     line-height: 16px;
  43.     padding-left: 30px;
  44.     width: 390px;
  45. }
  46. #features p a {
  47.     background: url(../images/arrow.jpg) 0px 2px no-repeat;
  48.     color: #f9edc3;
  49.     padding-left: 15px;
  50. }
  51. #features #feature-1 {
  52.     background: url(../images/slide1.jpg) top left no-repeat;
  53. }
  54. #features #feature-2 {
  55.     background: url(../images/slide2.jpg) top left no-repeat;
  56. }
  57. #features #feature-3 {
  58.     background: url(../images/slide3.jpg) top left no-repeat;
  59. }
  60. #features #feature-4 {
  61.     background: url(../images/slide4.jpg) top left no-repeat;
  62. }
  63. #features #feature-nav {
  64.     bottom: 0px;
  65.     height: 93px;
  66.     float:left;
  67.     /*position: absolute;*/
  68.     left: 0;
  69.     width: 880px;
  70.     list-style:none;
  71.     padding:0px;
  72. }
  73. #feature-nav li {
  74.     float: left;
  75.     height: 92px;
  76.     text-align: center;
  77.     width: 220px;
  78.     clear:left;
  79. }
  80. #feature-nav li a {
  81.     display: block;
  82.     height: 92px;
  83.     width: 220px;
  84.     text-indent: -9000px;
  85. }
  86. #feature-nav li a:hover {
  87.     cursor: pointer;
  88. }
  89. #feature-nav li#button1 {
  90.     background: url(../images/button1.jpg) top left no-repeat;
  91. }
  92. #feature-nav li#button2 {
  93.     background: url(../images/button2.jpg) top left no-repeat;
  94. }
  95. #feature-nav li#button3 {
  96.     background: url(../images/button3.jpg) top left no-repeat;
  97. }
  98. #feature-nav li#button4 {
  99.     background: url(../images/button4.jpg) top left no-repeat;
  100. }        
  101. #feature-nav li#button1 a.active {
  102.     background: url(../images/button1-active.jpg) top left no-repeat;
  103. }
  104. #feature-nav li#button2 a.active {
  105.     background: url(../images/button2-active.jpg) top left no-repeat;
  106. }
  107. #feature-nav li#button3 a.active {
  108.     background: url(../images/button3-active.jpg) top left no-repeat;
  109. }
  110. #feature-nav li#button4 a.active {
  111.     background: url(../images/button4-active.jpg) top left no-repeat;
  112. }
  113.  

javascript file

Expand|Select|Wrap|Line Numbers
  1.  
  2. /*    | Homepage Slideshow
  3.     ----------------------------------------    */
  4. var slideshow = {
  5.     timer : null,
  6.     delay : 5500,
  7.     t : 0,
  8.  
  9.     init : function()
  10.     {
  11.         slideshow.triggers = $('#feature-nav a');
  12.         slideshow.trigger_first = $('#feature-nav a:first');
  13.         slideshow.trigger_last = $('#feature-nav a:last');
  14.  
  15.         slideshow.items = $('#features .feature');
  16.  
  17.         slideshow.triggers.mouseover( function(){ slideshow._slide(this); slideshow._stop(); return false; });
  18.         slideshow._automate();
  19.     },
  20.  
  21.     _automate : function()
  22.     {
  23.         var most = slideshow.triggers.length;
  24.         target = $('#feature-nav a:eq('+ slideshow.t +')');
  25.         slideshow._slide(target);
  26.         slideshow.t++;
  27.         if ( slideshow.t == most )
  28.             slideshow.t = 0;
  29.         slideshow.timer = setTimeout( function(){ slideshow._automate() }, slideshow.delay );
  30.     },
  31.  
  32.     _stop : function()
  33.     {
  34.         slideshow.timer = clearTimeout(slideshow.timer);
  35.     },
  36.  
  37.     _slide : function(el)
  38.     {
  39.         var target = $(el).attr('rel');
  40.         slideshow.triggers.not(el).removeClass('active');
  41.       //alert(el);
  42.         $(el).addClass('active');
  43.         $(target).fadeIn('fast');
  44.         $(slideshow.items).not(target).fadeOut('fast');
  45.     }
  46. }
  47. $(document).ready(slideshow.init);
  48.  
  49.  
Jan 7 '10 #5
Dormilich
8,658 Expert Mod 8TB
on the other hand side, you can also position both elements absolutely …
Jan 7 '10 #6
neovantage
245 100+
Previously both these were positions absolutely. Check my CSS posted code

In id #features .feature and #features #feature-nav . In both cases these were Positioned absolutely.
Jan 7 '10 #7
Dormilich
8,658 Expert Mod 8TB
In both cases these were Positioned absolutely.
I remember the list not having a top value of 0.

EDIT: wouldn’t it be easier to change the div's background image than switching divs?
Jan 7 '10 #8
neovantage
245 100+
Thank you very much sir. it is fixed now.
One thing along with top property i also need to set the right property for banner area and left property for navigation area. If i don't do this then they overlap with each other.

Well thanks again for this great help.
Take Care
Jan 7 '10 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Graham Cross | last post by:
Dear All Is there an HTML way of aligning the images on this page http://www.ageconcernleics.com/review03/chairs03.html so that they appear evenly spaced relative to the text column on the...
2
by: Phester | last post by:
Hello monsters of CSS. I was wondering if you could help me with a layout problem. Here's a test page that demonstrates the problem: http://64.142.13.246/ls/test.htm (I've given the DIVs...
2
by: Iain Hallam | last post by:
Hi. I've got a few divs on a page that are positioned as "fixed". I now want my text to centre itself both horizontally and vertically. "text-align: center" on the body works for horizontal, but...
1
by: Linux Boy via .NET 247 | last post by:
(Type your message here) Hi everyone, I would like to ask a question about aligning text within one label. I have an application that everytime the user click on Enter Record button, they will...
5
by: Raj | last post by:
Hi, I have a ASP.NET project which is working fine and I need to align controls in a .aspx page. The webform( .aspx page) has variety of controls (labels, textboxes, radio buttons etc) and when...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
3
by: Mark Wiewel | last post by:
hi all, i am a newbie in ASP.NET and i couldn't find the solution to this one: i have a form with three datagrids on it. i would like to align them vertically with a space between each grid of...
4
by: matticus00 | last post by:
Hello. I'm putting together a css layout, and I have a large header <div>. Within that <div>, I would like to have a smaller <div> to put some navigation in, and have it be aligned to the TOP-RIGHT...
2
by: agbee1 | last post by:
Hello: I've finally made the effort to ween myself from overly using tables and use CSS for my positioning. However, I am having a problem with my navigational menu properly aligning in Firefox,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.