Avatar of kamileris
kamileris asked on

CSS padding help

hey,
in your style.css you made it for me says:
  #navbar span{
        padding-left: 8%;
        padding-right: 12%;
  }

I need to make this like I also use php like when somebody logs in there will be other links appears like control panel so I want all these links to fit in one line but with this padding percent it always gives a same amount of space, can we change it to just make sure everylink will be fit Thank you
title changed from "mr_egyptian i need your help EASY QUESTION LOOK"

Open in new window

HTMLCSS

Avatar of undefined
Last Comment
kamileris

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
mr_egyptian

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
kamileris

Hello,
the way you said it only give me a space between links but i want all these links to be centered and have a same amount of space between links, some screenshoots

ss1.JPG
ss2.JPG
ss3.JPG
mr_egyptian

Why not just set an absolute value that looks nice.  The menu is fixed width of 750px anyway, so fluidity is not an issue.  Something like the following works.  I think it would also look fine removing padding-right altogether.
  #navbar span{
          padding-left: 2em;
          padding-right: .5em;
  }

Open in new window

ASKER
kamileris

is there anyway we can make links centered? like this:
Thank you!
ss1.JPG
ss4.JPG
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
mr_egyptian

I'm afraid I don't ave any better suggestions for you.  What's wrong with the look of ss4.JPG (above) fixed at 2em?  I think it looks more professional anyway.  The user has all links in a row, without massive amounts of whitespace between them.  If you look, most sites do fixed positioning for navigation (eg. this site).  Sorry I can't help more.  Maybe someone else will chime in.
SOLUTION
b0lsc0tt

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
kamileris

so there isnt no easy way to center the links? I really dislike the way it looks in image ss4.jpg :( thank you for your comment i appreciate it!
b0lsc0tt

Are the images the same size (i.e. width)?  By centered do you mean the same amount of space between each of equal distance from the center of each?  There can be a difference between those.
I don't have a quick answer but if you can provide a sample page (i.e. html, images, etc) then I could try to see if we can find an option.  One consideration though is how flexible does it need to be.  As the window is made larger should the gap between the images increase or just the "white space" at each end?
Let me know if you have a question.  If you can provide a page then please attach it as a zip file.
bol
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
kamileris

thank you for your answer b0lsc0tt, there is only logo as image, Between links there are php's so in normal my navbar only has 4 links they are main, share, faq and register but when someones logins into my webpage i have 7 links on my navbar they are like control panel, your files... so when i use for example padding-left: 8% these links have a same amount of space between them it does looks good with only 4 links but when somebody logs in since there are 7 links for users these links looks like in ss2.JPG, But i want to make them like in ss3.JPG.
I appreciate your effort and your time Thank you!
ASKER
kamileris

anybody?
ASKER
kamileris

I will post this question again later this is kinda confusing so I am closing it and sharing the points I appreciate for your answers and your time! thank you!
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes