• 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
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

div element problem

 
Ranch Hand
Posts: 44
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am facing problems with the div element.

As per the tutorials, I am making a "Container" and then placing all the div components inside it. the problem I am facing is that the final layout always draws itself by leaving some space from the top and left corners of the brower. I have attached an image.

Also, I want to know, how can i make the width and height of the page/container dynamic (meaning covers the entire page and would alter itself depending upon the resolution of the user's screen).

==============
CODE (INDEX.HTML)
==============



================
CODE (GETSUGA.CSS)
================



confused.png
[Thumbnail for confused.png]
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Try putting the body padding to 0.

Also look into media queries for the other portion of your question.
Good article
 
Nelo Angelo
Ranch Hand
Posts: 44
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I altered the .css file as you suggested but it didn't work. The spaces are still there.

Also, I forgot to mention that I am actually using DreamWeaver for creating the page. I hope the gaps in the page have nothing to with this fact.
 
Ryan Christiani
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
CSS reset

If GETSUGA.css is all the css you have for the page put a css reset in there, it strips the page of predefined rules and lets you set it up the way you want.

Try that.
 
Sheriff
Posts: 67597
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or simply set the body margins to 0.
 
Nelo Angelo
Ranch Hand
Posts: 44
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Ryan and Bear. The margin issue is resolved.

Please, help me out with this too.

I am setting the width of the container to 1000 by 800 px to fit the resolution of my computer screen. If this page is accessed by a computer with a greater resolution, will the page appear only on 3/4th of the screen area?

How can I resolve this issue? Will reset css help?
 
Bear Bibeault
Sheriff
Posts: 67597
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't use pixels, use percetnages.
 
Nelo Angelo
Ranch Hand
Posts: 44
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks again...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic