Jump to content

Need help in CSS

Go to solution Solved by FlappyBoobs,
2 hours ago, Ashish Sharma-RSi said:

Tried the inspector, still can't fig. out the problem. I know, it is in the padding or margin, but can't seem to figure it out.

I missed the css the first time, sorry about that! I've had a look but don't have more than notepad and chrome at the moment (on mobile). I think that you should look at your column layout. At the moment they are behaving like 4 individual elements, rather than 2 rows of 2 elements, which is what I think you are after. As they all have different amounts of text that throws off the layout as they are all different sized boxes (height) as you use % widths on all the boxes at once. 

 

 

Try wrapping the two boxes you want in a row, and the setting the widths and heights to match each other so that the boxes are all the same size, use margin and padding on the boxes to get everything looking good. 

 

I hope that helps point you in the right direction. 

Hello, 

 

Can anyone help me out with this alignment problem with my columns? 

You can see the problem in the screenshot.

 

Thank You.

Screenshot (59).png

Link to comment
Share on other sites

Link to post
Share on other sites

Would be nice to provide some info on what you have used. The easiest solution would be 2x2 table or maybe float:left for the Paper prototyping ?

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, voiha said:

Would be nice to provide some info on what you have used. The easiest solution would be 2x2 table or maybe float:left for the Paper prototyping ?

They are just floating div's.

Link to comment
Share on other sites

Link to post
Share on other sites

can you link me to your code? its hard to know whats wrong without knowing whats going on

✧・゚: *✧・゚:*  Quote for a reply  *:・゚✧*:・゚✧

 

✧・゚: *✧・゚:*   Ask for discord   *:・゚✧*:・゚✧

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Ashish Sharma-RSi said:

They are just floating div's.

That's what I thought but without the code, I don't know what you did wrong. Have you tried implementing Bootstrap into it ? it's really easy once you get the hang of it.

Link to comment
Share on other sites

Link to post
Share on other sites

On 12/3/2018 at 9:11 PM, iLostMyXbox21 said:

can you link me to your code? its hard to know whats wrong without knowing whats going on

 

 

On 12/3/2018 at 9:14 PM, voiha said:

That's what I thought but without the code, I don't know what you did wrong. Have you tried implementing Bootstrap into it ? it's really easy once you get the hang of it.

Here we go...

 

https://drive.google.com/open?id=1C-a5m6wMsJh723gGeaijA16Rwm0RSXwB

Link to comment
Share on other sites

Link to post
Share on other sites

25 minutes ago, Ashish Sharma-RSi said:

can i have a .txt file? im on ios and cant open .html files

✧・゚: *✧・゚:*  Quote for a reply  *:・゚✧*:・゚✧

 

✧・゚: *✧・゚:*   Ask for discord   *:・゚✧*:・゚✧

Link to comment
Share on other sites

Link to post
Share on other sites

16 hours ago, Ashish Sharma-RSi said:

 

You've not included the CSS you've used, which is where the problem lies. 

 

Most likely you've not set the display attribute correctly or your wrapped column is too wide for both to fit. What does the inspector tell you when you open it?

 

Take a look into W3C for flex grid as that will help you a lot. Or just take a look below if you are happy to look at code (this is not my example so I provide no warranty :) )

 

https://codepen.io/MattWindle/pen/perZRG

Link to comment
Share on other sites

Link to post
Share on other sites

6 hours ago, FlappyBoobs said:

 

You've not included the CSS you've used, which is where the problem lies. 

 

Most likely you've not set the display attribute correctly or your wrapped column is too wide for both to fit. What does the inspector tell you when you open it?

 

Take a look into W3C for flex grid as that will help you a lot. Or just take a look below if you are happy to look at code (this is not my example so I provide no warranty :) )

 

https://codepen.io/MattWindle/pen/perZRG

CSS is there in the folder "css"

22 hours ago, iLostMyXbox21 said:

can i have a .txt file? im on ios and cant open .html files

Added .txt files for both css and html.

 

  

Thanks, a lot for helping.

Link to comment
Share on other sites

Link to post
Share on other sites

6 hours ago, FlappyBoobs said:

 

You've not included the CSS you've used, which is where the problem lies. 

 

Most likely you've not set the display attribute correctly or your wrapped column is too wide for both to fit. What does the inspector tell you when you open it?

 

Take a look into W3C for flex grid as that will help you a lot. Or just take a look below if you are happy to look at code (this is not my example so I provide no warranty :) )

 

https://codepen.io/MattWindle/pen/perZRG

Tried the inspector, still can't fig. out the problem. I know, it is in the padding or margin, but can't seem to figure it out.

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Ashish Sharma-RSi said:

Tried the inspector, still can't fig. out the problem. I know, it is in the padding or margin, but can't seem to figure it out.

I missed the css the first time, sorry about that! I've had a look but don't have more than notepad and chrome at the moment (on mobile). I think that you should look at your column layout. At the moment they are behaving like 4 individual elements, rather than 2 rows of 2 elements, which is what I think you are after. As they all have different amounts of text that throws off the layout as they are all different sized boxes (height) as you use % widths on all the boxes at once. 

 

 

Try wrapping the two boxes you want in a row, and the setting the widths and heights to match each other so that the boxes are all the same size, use margin and padding on the boxes to get everything looking good. 

 

I hope that helps point you in the right direction. 

Link to comment
Share on other sites

Link to post
Share on other sites

21 hours ago, FlappyBoobs said:

I missed the css the first time, sorry about that! I've had a look but don't have more than notepad and chrome at the moment (on mobile). I think that you should look at your column layout. At the moment they are behaving like 4 individual elements, rather than 2 rows of 2 elements, which is what I think you are after. As they all have different amounts of text that throws off the layout as they are all different sized boxes (height) as you use % widths on all the boxes at once. 

 

 

Try wrapping the two boxes you want in a row, and the setting the widths and heights to match each other so that the boxes are all the same size, use margin and padding on the boxes to get everything looking good. 

 

I hope that helps point you in the right direction. 

Thanks a lot for that.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×