This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • 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
  • 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.
 
Ruth Stout was famous for gardening naked. Just like this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!