• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

HTML and CSS: Unable to align the DIV properly

 
Ranch Hand
Posts: 507
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Please have a look at the below code.

index.html



styles.css


My above code generates the below web page.



You can see how the Video container and the Logo above it (when posting to SO, I removed the logo by painting it using black colour; so the logo is above the video, and that is what you see as a black colour box) in the right side are out of alignments. It is even worse if someone zoomed in or zoomed out the web page, because the video container and logo is getting more and more out of aligned.

Please have a look at the below image



The above image shows my expectation. The video and logo are properly aligned and they are not getting out of aligned if the web page is zoomed in or zoomed out.

The name of the DIV which contains the Logo is apDiv1 and you can find it in line 24 of the HTML code. The name of the DIV which contains the video and all is video_container2 and you can find it in line 40.

I have shortened the code to the maximum level so it is easy for you to read.

So how can I fix this alignment issue?

PS: I have posted this in this link too, but no answer yet, so I am seeking for your help.
 
reply
    Bookmark Topic Watch Topic
  • New Topic