d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Vertical & Horizontal Div Align
12Next
Add Reply New Topic New Poll
Member
Posts: 6,420
Joined: Jan 27 2008
Gold: 1,327.99
Dec 5 2013 08:26pm
Hi guys, what is the best and easy way to align vertically and horizontally a div ?
Member
Posts: 11,610
Joined: Oct 28 2008
Gold: 1,795.00
Member
Posts: 6,420
Joined: Jan 27 2008
Gold: 1,327.99
Dec 5 2013 09:02pm
Quote (0n35 @ Dec 6 2013 03:00am)


There are loads of results on Google, all of them are different, that is why I am not asking "how" to do it but "what is the best way" to do it.
Member
Posts: 2,736
Joined: Nov 28 2009
Gold: 34.00
Dec 6 2013 03:50am
Quote (Arnage @ 6 Dec 2013 05:02)
There are loads of results on Google, all of them are different, that is why I am not asking "how" to do it but "what is the best way" to do it.


Still, google it. Just like we did to learn. Why wouldn't you find the best way to do it on Google? Do you think you're the first one on the internet to ask that question? Allow me to giggle in the most manly way possible- yes, my beard is at least 1 inch so I'm allowed.

This post was edited by Eagl3s1ght on Dec 6 2013 03:51am
Member
Posts: 6,420
Joined: Jan 27 2008
Gold: 1,327.99
Dec 6 2013 07:41am
Quote (Eagl3s1ght @ Dec 6 2013 09:50am)
Still, google it. Just like we did to learn. Why wouldn't you find the best way to do it on Google? Do you think you're the first one on the internet to ask that question? Allow me to giggle in the most manly way possible- yes, my beard is at least 1 inch so I'm allowed.


That sounded manly enough, but still, I googled it and looked at a LOT of results, and I still don't know which one is the best one. To me, loads of them looks more like CSS tricks than the real way of doing it.
Member
Posts: 2,736
Joined: Nov 28 2009
Gold: 34.00
Dec 6 2013 12:09pm
Quote (Arnage @ 6 Dec 2013 15:41)
That sounded manly enough, but still, I googled it and looked at a LOT of results, and I still don't know which one is the best one. To me, loads of them looks more like CSS tricks than the real way of doing it.


Don't be fooled by your illusion of what you consider "CSS tricks" to be, I use the method 0n35 linked above (http://forums.d2jsp.org/topic.php?t=69455640&f=126&p=465934851) and I'm sure he would use the same method himself.

This post was edited by Eagl3s1ght on Dec 6 2013 12:09pm
Member
Posts: 6,420
Joined: Jan 27 2008
Gold: 1,327.99
Dec 6 2013 02:39pm
Quote (Eagl3s1ght @ Dec 6 2013 06:09pm)
Don't be fooled by your illusion of what you consider "CSS tricks" to be, I use the method 0n35 linked above (http://forums.d2jsp.org/topic.php?t=69455640&f=126&p=465934851) and I'm sure he would use the same method himself.


I knew that method, but the problem with the negative margins is that if you reduce the window, the overflow of content will disappear without any scroll bar to see it.
Member
Posts: 2,736
Joined: Nov 28 2009
Gold: 34.00
Dec 6 2013 02:55pm
Quote (Arnage @ 6 Dec 2013 22:39)
I knew that method, but the problem with the negative margins is that if you reduce the window, the overflow of content will disappear without any scroll bar to see it.


Then use other CSS for a smaller window, using Media queries.
For example, if #popup is 300px and window is smaller than 300, reduce #popup to 200px with margin-left: -100px
Member
Posts: 6,420
Joined: Jan 27 2008
Gold: 1,327.99
Dec 6 2013 03:38pm
Quote (Eagl3s1ght @ Dec 6 2013 08:55pm)
Then use other CSS for a smaller window, using Media queries.
For example, if #popup is 300px and window is smaller than 300, reduce #popup to 200px with margin-left: -100px


Are the media queries working well with the old versions of browsers ?
Member
Posts: 2,736
Joined: Nov 28 2009
Gold: 34.00
Dec 6 2013 03:48pm
Quote (Arnage @ 6 Dec 2013 23:38)
Are the media queries working well with the old versions of browsers ?


Now we're there again, where you forgot how to Google.
Let me remind you:
1. Open your browser
2. Navigate to the website http://www.google.com
3. Type what you're looking for in the search field (eg. media+queries+compatibility+chart)
4. Click the submit button

Yes, it's that hard. Hope you can handle it!
Go Back To Programming & Development Topic List
12Next
Add Reply New Topic New Poll