Mobile app version of vmapp.org
Login or Join
Tiffany637

: Web page element width i saw this on a website, and looked a bit through the css, but coudn't quite find what I am looking for. How to make a html element let's say a <div> with width

@Tiffany637

Posted in: #Css #Html

i saw this on a website, and looked a bit through the css, but coudn't quite find what I am looking for.
How to make a html element let's say a <div> with width of eg. 3000px but make so that page doesen't put up scrollers automaticlly so that you can scroll to the right most and see the end of that content. But if the page is resized to let's say resolution smaller then 800x600, scrollbars appear (becouse the MAIN content is bigger than that), but they only let you scroll and see the MAIN content, not the right most part of the said <div>.

So basically, how to a browser ignore an elemets width or height no matter how big or sall it is?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Tiffany637

2 Comments

Sorted by latest first Latest Oldest Best

 

@Fox8124981

found it...
i anyone else has the same problem, the solution is min-width and min-height...

10% popularity Vote Up Vote Down


 

@Moriarity557

You apply the sizes for the div using CSS styles. You can do them inline or in a stylesheet document (recommonended)

Its hard to do a proper design that reaches all monitor widths. You see this for admin interfaces, or online maps, but most popualr websites have around a 960px width.

An approach you can do with CSS is:
min-width:600px, max-widht:1200px;. This will make a div that has to be at least 600px fat and wont get fatter than 1200px. The problem is if a website gets too fat, and someone opens it up on a 1920x1200 screeen or 2560x1600 screen then the website looks really funny.

In anycase, be careful with this type of design. Usually the width of this web page is the best choice .

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme