Computer problems,Computer help
*AX SOFT>>>Programming & Design

Css alignment question?


I have a navigation bar div that is written using float. How can I get rid of the whitespace above it because of the div?

I only know to get rid of the whitespace by using a negative top value with absolute positioning, but this is impossible because the div is floated.

Hard to say with certainty what the "best" approach would be without a deep understanding of the parent/child context, but you can shift the div "upward" by using a negative margin-top value.

Guru on the mountain top says you must clear the float. Try this:

(Wrap this around your div)

<div style="height:auto; width:100%; overflow:hidden;">
(Your nav bar here)
</div>

Tags
  General - Computers & Internet   Software   Security   Programming & Design   Facebook   Flickr   Google   MSN   MySpace
Related information
  • What does this c code output? Really simple and Easy!?

    offhand, I believe its.. 9 2 1 27 not sure if i'm right though edit: I just ran it, I'm right, that is what it is. But if you're in a programing class, this is something you...

  • What programming language should I start learning as the first language?

    I would suggest C, then C++ as well as the Linux operating system. A lot of the security software was written for and in Linux or Unix. Not surprising, the majority of it is also written in C or...

  • Backup file location?

    Removeable media. DVD, CD-ROM or CD-WORM, tape, USB external hard drive... Anything that you can take away from the computer physically, put it in another room, or let a trusted relative keep it....

  • What program can i use to make a timeline?

    u can use Microsoft word and draw a line. then use little lines as the lines. then put a text box at every line.

    ...
  • How can i find free templates for lightscribe?

    Their website has some cool templates and even free programs to use them.

    ...
  • How do you submit a form in address bar?

    Here it is, but I used some different URLs because I didn't want the example to have dead links... <script language="javascript"> function gotoNew() { var myURL = do...

  • How can I create a gif image from a video?

    I've used ...

  • I have an awesome idea, but I don't know if it would work. Can you answer my question?

    Yes, you can create a site using notepad. Just open it up, write the code, and save it as the appropriate file type, such as .html. This of course assumes you know how to write HTML code. This only...

  •  

    Categories--Copyright/IP Policy--Contact Webmaster