How to align to the left? HTML/CSS? - KingPin's Forum
KPsDenKPsDen ArmoryImage HostingLegendz text RPGIp DisplayIRCFlash Arcade
Forum
      |        
Register
         .trade in Reputation Item list (Posted By:jesseman - Replies:18 - Views:223)      « »     Reported Visitor Message by redemption (Posted By:redemption - Replies:0 - Views:1)      « »     You Know You're Addicted To WoW When (Posted By:Evul Bot! - Replies:97 - Views:783)      « »     [epic] post you pic thread [/epic] (Posted By:Bionuclear - Replies:257 - Views:5702)      « »     Question (Posted By:Bionuclear - Replies:4 - Views:45)      « »     hello (Posted By:redemption - Replies:4 - Views:33)      « »     Just been ganked (Posted By:cedrics - Replies:6 - Views:77)      « »     Wall Animation (Posted By:Zangetsu - Replies:2 - Views:50)      « »     FREE watching online TV from China (Posted By:mindyschott - Replies:0 - Views:6)      « »     where i go to report a gm (Posted By:JRBLOODMIST - Replies:2 - Views:47)      « »     
KingPin's Forum
 
K.P.s.N. Register vbBux / KPs Mall Bugs Blogs FAQ Search Today's Posts Mark Forums Read Donate
Go Back   KingPin's Forum > KP's Network Forum > RSS News
Reload this Page How to align to the left? HTML/CSS?
 


RSS News This is a discussion on How to align to the left? HTML/CSS? in the RSS News;
Description: Here is my webpage: http://www.ivoog.com/link The small box under the big box in positioned how I want it because I ...

Reply
 
LinkBack Thread Tools
How to align to the left? HTML/CSS?
(#1 (permalink))
Old
Answer Man is Offline
Private
Points: 153, Level: 2 Points: 153, Level: 2 Points: 153, Level: 2
Activity: 0% Activity: 0% Activity: 0%
Answer Man is an unknown quantity at this point
 
Answer Man
Rupees: 98.00
Bank: 500.00
Total Rupees: 598.00
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2008
How to align to the left? HTML/CSS? - January 1st, 2008

Here is my webpage:

http://www.ivoog.com/link

The small box under the big box in positioned how I want it because I used margin-left:13px.

Now try to resize your browser. See how the big box movies but the smaller one stays in place?

I need both of the boxes left sides to be aligned no matter how you move your browser. How can I do this?

Please explain with detail as I am new to html and css. Thank you!

 
Reply With Quote
Revenue Shared Ads
(#2 (permalink))
Old
Ti_Cool_Tech is Offline
Private
Points: 149, Level: 1 Points: 149, Level: 1 Points: 149, Level: 1
Activity: 0% Activity: 0% Activity: 0%
Ti_Cool_Tech is an unknown quantity at this point
 
Ti_Cool_Tech
Rupees: 1.00
Bank: 500.00
Total Rupees: 501.00
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2008
January 1st, 2008

Put it in a table and align the table to the left. The table will put all in the same aspect ratio.... So, if the browser repositioned, then the table will hold it all together...

 
Reply With Quote
(#3 (permalink))
Old
Opal is Offline
Private
Points: 194, Level: 2 Points: 194, Level: 2 Points: 194, Level: 2
Activity: 0% Activity: 0% Activity: 0%
Opal is an unknown quantity at this point
 
Opal
Rupees: 4.40
Bank: 500.00
Total Rupees: 504.40
 
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Dec 2007
January 1st, 2008

It's because you put a 1% left and right margin on your #header. In this case, the percentage is relative to the browser width, so when you make the browser smaller, the value of the margin is recalculated and - as a result - smaller, making the div move more to the left. I did a test in Dreamweaver here; I removed the margin and it stays put. Replace the percent with a value in pixels.

And please don't use tables. They are not necessary for layouts, except for tabular data. They create bloated code and accessibility issues for disabled people using screen readers.

 
Reply With Quote
(#4 (permalink))
Old
Kenny is Offline
Private
Points: 189, Level: 2 Points: 189, Level: 2 Points: 189, Level: 2
Activity: 0% Activity: 0% Activity: 0%
Kenny is an unknown quantity at this point
 
Kenny
Rupees: 74.20
Bank: 500.00
Total Rupees: 574.20
 
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Dec 2007
January 1st, 2008

yes, you could use a table, check using a div tag as well, and aligning that to the left. That might work, and would save some lines of code. Check whichever method you choose in both IE and Firefox, though, because IE can be REALLY screwy with css, though Im sure you know that.
Putting them both in the same block element should have the same effect, but css can be tricky sometimes. Perhaps align the left with the header class you use; also, is position relative in that context neccesary?

 
Reply With Quote
(#5 (permalink))
Old
Zurahn is Offline
Private
Points: 154, Level: 2 Points: 154, Level: 2 Points: 154, Level: 2
Activity: 0% Activity: 0% Activity: 0%
Zurahn is an unknown quantity at this point
 
Zurahn
Rupees: 3.30
Bank: 500.00
Total Rupees: 503.30
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2008
January 1st, 2008

The changing differential is due to your use of 1% in the header class in your CSS. Change that to a fixed value (13px) and it will stay constantly aligned.

Change
.header {margin: 0px 1%;

to
.header {margin: 0px 13px;

 
Reply With Quote
(#6 (permalink))
Old
Zurahn is Offline
Private
Points: 154, Level: 2 Points: 154, Level: 2 Points: 154, Level: 2
Activity: 0% Activity: 0% Activity: 0%
Zurahn is an unknown quantity at this point
 
Zurahn
Rupees: 3.30
Bank: 500.00
Total Rupees: 503.30
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jan 2008
January 1st, 2008

The changing differential is due to your use of 1% in the header class in your CSS. Change that to a fixed value (13px) and it will stay constantly aligned.

Change
.header {margin: 0px 1%;

to
.header {margin: 0px 13px;
 
Reply With Quote
Revenue Shared Ads
Reply

Bookmarks

Tags
align, html or css, left

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Rupees Per Thread View: 1.00
Rupees Per Thread: 15.00
Rupees Per Post: 5.00
Forum Jump



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright 2004-2009 KPsN


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80