Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

html spacing

Featured Replies

Id like to create a site similar looking to this : apaul .com

 

But with html.

 

But instead of flash image i will have a logo jpeg above links and centred.

 

I want to add links across the way like on this site but with html, how do i get these links spaced, and centred like it is on this site? but all html or css?

Id like to create a site similar looking to this : apaul .com

 

But with html.

 

But instead of flash image i will have a logo jpeg above links and centred.

 

I want to add links across the way like on this site but with html, how do i get these links spaced, and centred like it is on this site? but all html or css?

 

 

I Would have the links in DIV containers and define left and right padding in css.

Something like this:

 

 

CSS:

 

.navbar {

width:1000px
padding:5px;
margin:auto;

}


.navbox {

width:50px;
padding-left:5px;
padding-right:5px;

}


 

 

html:

<div class="navbar">


<div class="navbox"><a href="link.html">link name</a></div>
<div class="navbox"><a href="link.html">link name</a></div>
<div class="navbox"><a href="link.html">link name</a></div>
<div class="navbox"><a href="link.html">link name</a></div>
<div class="navbox"><a href="link.html">link name</a></div>
<div class="navbox"><a href="link.html">link name</a></div>
<div class="navbox"><a href="link.html">link name</a></div>

</div>

Edited by unknownmale

Go with the list method.

 

HTML

<ul>
     <li><a href="#">Item 1</a></li>
     <li><a href="#">Item 2</a></li>
     <li><a href="#">Item 3</a></li>
     <li><a href="#">Item 4</a></li>
</ul>

 

CSS


ul {
list-style-type: none;
}
li {
float: left;
padding-right: 10px; /* Or what ever you want */
padding-left: 10px; /* Or whatever you want */
}

Edited by MikeChipshop

  • Author

Ok thank you,

 

and how do you position the image and links in the centre of screen.

from top to bottom centred.

 

i used CENTER TAGS each side of the UL but it did not center also.

Edited by hunty

Don't use <center> tag as it's depreciated.

Instead wrap it in a...

<div id="wrapper">
<img src="blah.jpg" />
</div>

 

with the CSS of...


#wrapper {
width: ??? /* same width as image */
margin-right: auto;
margin-left: auto;
}

Edited by MikeChipshop

...or use

#wrapper {
text-align: center;
}

  • Author

thanks, il give it a go and get back to you. thanks.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.