|
![]() |
Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming | |
Issue with <DIV> Tags and Screen Resolution
|
||
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) | |||||||||||||
|
WaterCooler
|
Hi all I am currently building a website and have neared completion, but have discovered a fatal flaw!
__________________The site functions perfectly within the resolution I have developed it within (1920 x 1200) while any other resolution completely throws everything off positioning wise. The way I have set it up is a main title <DIV> at the top with another <DIV> below as the main content section, this is centred within the middle of the page and has an equal amount of white space either side of it. When viewed within a 1680 x 1050 resolution though (along with other resolutions) the content section is positioned off centre, along with all of the navigational buttons and images Is there a way to scale these DIV's so that they automatically adapt to the resolution they are being viewed in ? Have set all the values in percentages but this does not seem to resolve the issue due to obvious reasons Thanks
|
|||||||||||||
|
|
|
|
|
#2 (permalink) | |||||||||||
|
Programmer
|
I initially created my website TunerSpotter.com with divs and had the same problem. I had to pay some web guru from craigslist(only $140 with retainer!) to convert the divs to tables and <td><tr> etc. so it looks nice at most standard resolutions. I'm having a hard time getting it to look good on iPhone's Safari browser, though.
I'm a database and algorithm programmer, not a web designer xD
__________________
i7 920
CPU-Z 4.45GHz PCPitstop score 15,225 SuperPi 1M 9.344s Turion x2 TL-68 @ 2.7GHz PCPitstop score 4,258 #1 hwbot.org cpu-z #1 hwbot.org SuperPi (36.80)
|
|||||||||||
|
|
|
|
|
#3 (permalink) | |||||||||||||
|
Intel Overclocker
![]() |
Hey man. The first thing you need to do is make your div's percentages instead of absolute values. Also do not use tables like the above poster said.
Here is the div Code:
<div id="Main" style="width: 50%; margin: 0 auto;">Hello</div>
__________________
Last edited by dham : 2 Weeks Ago at 10:09 AM |
|||||||||||||
|
|
|
|
|
#4 (permalink) | |||||||||
|
AMD Overclocker
|
What position did you put the entire <body> as? Absolute? Relative?
__________________
|
|||||||||
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|