473,395 Members | 1,891 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 3842
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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.