473,395 Members | 1,938 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,395 software developers and data experts.

Format problem(navigation bar appears in the left and main body of content/section ap

I am using navigation and section tags. The navigation bar appears on the right and the section(main body/content) which has to appear in th center appears on the leftof the screen/navigation bar. I am not able to correct that. Please help me!
This is the code I used for it. Though I changed the float it doesnt work

Expand|Select|Wrap|Line Numbers
  1. nav {
  2.     background-color:rgba(222,184,135,0.5);;
  3.     /*margin:5px;*/
  4.     font-size:20px;
  5.     line-height:30px;
  6.     height:443px;
  7.     width:100px;
  8.     float:left;
  9.     text-align:left;
  10.     padding:5px;          
  11. }
  12.  
  13. section{
  14.     width:300px;
  15.     float:inherit;
  16.     */text-align:center;*/
  17.     padding:10px;          
  18. }
Jul 5 '15 #1
1 3841
computerfox
276 100+
Normally when using float with two objects in the same container, they will usually go left and right, so your CSS is doing it correctly.

You can try to add
Expand|Select|Wrap|Line Numbers
  1. clear:both;
  2.  
to your nav, but I have a strong biased against the current structure.
I would use a separate div container and use two divs for those two objects. All browsers support divs, while some might not support "nav" and "section".
Jul 7 '15 #2

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

Similar topics

0
by: Mike Kozlowski | last post by:
I have a div floated left for a navbar, with another div in the normal flow for content, like so: #leftnav { float: left; width: 120px; } #content { margin-left: 170px; margin-right: 10px;} ...
5
by: gbit | last post by:
Hi, I have a web page describing a procedure using generic names. At the top of the page I have a text box. When the user enters a specific name in the text box, I would like the page to...
0
by: MS News | last post by:
Hi All, I have a requirement to export asp.net page to Excel and Word. I need to set the default page setup for these documents to Landscape and Fit to page. I followed guidelines from the MS KB...
1
by: sovereign6 | last post by:
Hello All, I have created my site in Dreamweaver MX2004. It appears that the page does not display correctly in IE 6.00 or Firefox Version 2 but no problem in Opera 8 or 9. A gap appears...
7
by: Dag Sunde | last post by:
I want to use the format-number function to output a number with a specific number of decimals, based on the content of a node... Is there any smart way to generate differnet strings based on a...
3
by: Libra79 | last post by:
Hi, I am looking into changing the backcolor of a report text box depending if the data for that record contains a portion of a string. the field is a text field. If it were a query i know how...
10
by: Brent | last post by:
I have a list of company names (say, IBM, Corning, General Motors, and another 5,000 of them). If I take a body of text, a news article, for instance, and I want to see which company names...
0
by: gcwg | last post by:
Hi all, I am attempting to use the LWP::UserAgent to request a Soap call, and in the response the request returns a TIFF image. When I write the contents out to a file(binary mode), the file also...
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.