By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,787 Members | 1,124 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,787 IT Pros & Developers. It's quick & easy.

changing in positions of the items

P: 15
Hello it may be a silly question but am new in HTML , i have a html page that contain several items , labels , images... but when i open it in the browser and change the size of the browser the items change their position i need to keep them fixed not to move when the browser change its size since the design of the page will change
Jan 16 '07 #1
Share this Question
Share on Google+
4 Replies


acoder
Expert Mod 15k+
P: 16,027
You need to use a fixed width layout. Give your code and we can suggest changes.
Jan 16 '07 #2

P: 15
<div class="nav">
<ul>
<li><a href="default.html" title="Home">Home</a></li>
<li><a href="aboutus.html" title="About us">About us</a></li>
<li><a href="Projects.html" title="Our Porjects">Our Projects</a></li>
<li><a href="News.html" title="News">News</a></li>
<li><a href="mailto:alaas@Softflow.com.lb" title="">Contact us</a></li>
</ul>
</div><!-- end of nav -->


.nav {
float:left;
width:150px;
margin-left:-100%;
margin-top:20px;
}

.nav ul li {
/*display:block;*/
margin-top:0;
background:url(navbg.png) left repeat-x;
border-bottom:1px solid #000;
font-weight:700;
padding:10px;
}
Jan 16 '07 #3

Expert 100+
P: 1,892
<div class="nav">
<ul>
<li><a href="default.html" title="Home">Home</a></li>
<li><a href="aboutus.html" title="About us">About us</a></li>
<li><a href="Projects.html" title="Our Porjects">Our Projects</a></li>
<li><a href="News.html" title="News">News</a></li>
<li><a href="mailto:alaas@Softflow.com.lb" title="">Contact us</a></li>
</ul>
</div><!-- end of nav -->


.nav {
float:left;
width:150px;
margin-left:-100%;
margin-top:20px;
}

.nav ul li {
/*display:block;*/
margin-top:0;
background:url(navbg.png) left repeat-x;
border-bottom:1px solid #000;
font-weight:700;
padding:10px;
}
Please show the comple code and use [code] tags
Jan 16 '07 #4

drhowarddrfine
Expert 5K+
P: 7,435
If you use a percentage for the margin, then the content will move depending on the size of the browser. Remove that line.
Jan 16 '07 #5

Post your reply

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